diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-07-29 20:03:18 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-07-29 20:03:18 -0700 |
commit | 187685ec560594fd5e1b26b76c6fea4ec92cc652 (patch) | |
tree | 1bf9bc3f4970fac8d7e4536050959075b60a6c7c /txr.1 | |
parent | ec2bdf886c2970b7b0977bd014cdb7987e7c2dae (diff) | |
download | txr-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.1 | 14 |
1 files changed, 11 insertions, 3 deletions
@@ -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 |