diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2023-12-27 21:21:02 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2023-12-27 21:21:02 -0800 |
commit | 5da0c2024c0d3dd065ece6f80968f2f433dfa2be (patch) | |
tree | 715102a03f01515a88b75fcdd33c837bff953885 /libtags.txr | |
parent | eaa53bd84f8dcef22b35b4a889ae46476307d6eb (diff) | |
download | txr-5da0c2024c0d3dd065ece6f80968f2f433dfa2be.tar.gz txr-5da0c2024c0d3dd065ece6f80968f2f433dfa2be.tar.bz2 txr-5da0c2024c0d3dd065ece6f80968f2f433dfa2be.zip |
perm, rperm, comb, rcomb: test generic sequences, bugfixes.
perm doesn't generate items of the right type. We need
to add the original sequence to the state vector and
use make_like.
The new generic sequence support in rperm is broken, too.
* combi.c (perm_while_fun, perm_gen_fun_common): Rename p
variable to vec.
(perm_init_common): Rename to perm_init. Take one more
argument and store in new fourth element of state vector.
(perm_vec, perm_list, perm_str): Pass nil to new parameter
of perm_init.
(perm_seq_gen_fun): Use perm_list_gen_fun to get list
permutations, and coerce each one to the same type as
the sequence with make_like.
(rcomb_seq_gen_fun): Remove redundant call to
rcomb_gen_fun_common. The rcomb_list_gen_fun function
is called, which does this already, so we lose every
other sequence element.
* tests/015/comb.tl: New tests.
Diffstat (limited to 'libtags.txr')
0 files changed, 0 insertions, 0 deletions