summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
Diffstat (limited to 'txr.1')
-rw-r--r--txr.132
1 files changed, 29 insertions, 3 deletions
diff --git a/txr.1 b/txr.1
index 900a860e..195dd441 100644
--- a/txr.1
+++ b/txr.1
@@ -7936,7 +7936,7 @@ permutations is of zero length.
The permutations are lexicographically ordered.
-.SS Function comb
+.SS Functions comb and rcomb
.TP
Syntax:
@@ -7952,8 +7952,8 @@ 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 positive integer no greater than the length of <seq>,
-and <seq> must be a sequence.
+Argument <len> must be a nonnegative integer no greater than the length of
+<seq>, and <seq> must be a sequence.
The combinations in the returned list are sequences of the same kind as <seq>.
@@ -7962,6 +7962,32 @@ permutations is of zero length.
The combinations are lexicographically ordered.
+.SS Function rcomb
+
+.TP
+Syntax:
+
+ (rcomb <seq> <len>)
+
+.TP
+Description:
+
+The comb function returns a lazy list which consists of all
+length <len> repeating combinations formed by taking items taken from
+<seq>. "Repeating combinations" means that the combinations can use
+an element of <seq> more than once.
+
+Argument <len> must be a nonnegative integer, and <seq> must be a sequence.
+
+The combinations in the returned list are sequences 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. This is true even if <seq> is empty.
+
+If <seq> is empty, and <len> is nonzero, then an empty list is returned.
+
+The combinations are lexicographically ordered.
+
.SH CHARACTERS AND STRINGS
.SS Function mkstring