summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-07-29 20:03:18 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-07-29 20:03:18 -0700
commit187685ec560594fd5e1b26b76c6fea4ec92cc652 (patch)
tree1bf9bc3f4970fac8d7e4536050959075b60a6c7c /txr.1
parentec2bdf886c2970b7b0977bd014cdb7987e7c2dae (diff)
downloadtxr-187685ec560594fd5e1b26b76c6fea4ec92cc652.tar.gz
txr-187685ec560594fd5e1b26b76c6fea4ec92cc652.tar.bz2
txr-187685ec560594fd5e1b26b76c6fea4ec92cc652.zip
* eval.c (repeatv): Renamed to repeat. Turned into function
with one optional argument, reflecting existing behavior. (eval_init): Registration of repeat updated. * txr.1: Fixed incorrect documentation which falsely suggests that repeat takes multiple lists, and doesn't mention the optional count.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.114
1 files changed, 11 insertions, 3 deletions
diff --git a/txr.1 b/txr.1
index 7fda0ce7..33c634d7 100644
--- a/txr.1
+++ b/txr.1
@@ -9062,13 +9062,21 @@ Example:
Syntax:
- (repeat <list1> <list>*)
+ (repeat <list> [<count>])
.TP
Description:
-The repeat function produces an infinite lazy list formed by the repeatedly
-cycled catenation of the argument lists.
+If <list> is empty, then repeat returns an empty list.
+
+If <count> is omitted, the repeat function produces an infinite lazy list
+formed by catenating together copies of <list>.
+
+If <count> is specified and is zero or negative, then an empty list is
+returned.
+
+Otherwise a list is returned consisting of <count> repetitions of <list>
+catenated together.
.SS Macros gen and gun