summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-02-11 01:21:17 -0800
committerKaz Kylheku <kaz@kylheku.com>2014-02-11 01:21:17 -0800
commita32e4c21286764c013950015108d745fbdcd97ae (patch)
tree69f35b4dd96b0cf2d99fdcea6068ef13969ec411 /txr.1
parent1e90ef3c7658e2770940f6cb870bb671733cc188 (diff)
downloadtxr-a32e4c21286764c013950015108d745fbdcd97ae.tar.gz
txr-a32e4c21286764c013950015108d745fbdcd97ae.tar.bz2
txr-a32e4c21286764c013950015108d745fbdcd97ae.zip
* combi.c (comb_hash_while_fun, comb_hash_gen_fun, comb_hash): New
static functions. (comb): Support hash tables. * hash.c (print_key_val): When values are nil, print in a more condensed way by omitting the second element. This notation is accepted as input already by the parser. (hash_insert_pair): New function. * txr.1: Description of comb updated to indicate that it works over hashes.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.114
1 files changed, 8 insertions, 6 deletions
diff --git a/txr.1 b/txr.1
index f7b65d7d..2d7f5274 100644
--- a/txr.1
+++ b/txr.1
@@ -7957,18 +7957,20 @@ length <len> non-repeating combinations formed by taking items taken from
element of <seq> more than once. If <seq> contains no duplicates, then
the combinations contain no duplicates.
-Argument <len> must be a nonnegative integer, and <seq> must be a sequence.
+Argument <len> must be a nonnegative integer, and <seq> must be a sequence
+or a hash table.
-The combinations in the returned list are sequences of the same kind as <seq>.
+The combinations in the returned list are objects of the same kind as <seq>.
If <len> is zero, then a list containing one combination is returned, and that
permutations is of zero length.
-If <len> exceeds the length of <seq>, then an empty list is returned,
-since it is impossible to make a single non-repeating combination that
-requires more items than are available.
+If <len> exceeds the number of elements in <seq>, then an empty list is
+returned, since it is impossible to make a single non-repeating combination
+that requires more items than are available.
-The combinations are lexicographically ordered.
+If <seq> is a sequence, the returned combinations are lexicographically ordered.
+This requirement is not applicable when <seq> is a hash table.
.SS Function rcomb