repeat


(repeat number [ exprA [ exprB ... ] ] )

This function evaluates all expressions exprA, exprB, ... for the specified number of cycles.

Arguments

number  (integer, not negative) number of cycles to repeat the specified expressions
exprA  any Lisp expression
exprB  any Lisp expression
:

Return

the result of last evaluated expression

Example

(setq x 2)
(repeat 3 (setq x (* 2 x)))  16

Remarks

if no expression is provided, NIL is returned;
no (progn) is necessary to combine multiple expressions as a single statement for the (repeat ...) expression



©  Bricsys NV. All rights reserved.