|
Allegro CL |
ANSI Common Lisp 6.1.8 Examples of Miscellaneous Loop Features
(let ((i 0)) ; no loop keywords are used
(loop (incf i) (if (= i 3) (return i))))
In the following example, the variable x is stepped before y is stepped; thus, the value of y reflects the updated value of x:
(loop for x from 1 to 10
for y = nil then x
collect (list x y))
In this example, x and y are stepped in parallel:
(loop for x from 1 to 10
and y = nil then x
collect (list x y))
|