From 187685ec560594fd5e1b26b76c6fea4ec92cc652 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 29 Jul 2014 20:03:18 -0700 Subject: * 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. --- txr.1 | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'txr.1') 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 *) + (repeat []) .TP Description: -The repeat function produces an infinite lazy list formed by the repeatedly -cycled catenation of the argument lists. +If is empty, then repeat returns an empty list. + +If is omitted, the repeat function produces an infinite lazy list +formed by catenating together copies of . + +If is specified and is zero or negative, then an empty list is +returned. + +Otherwise a list is returned consisting of repetitions of +catenated together. .SS Macros gen and gun -- cgit v1.2.3