Iteration construct similar to CL:LOOP. It is more extensible and has a more Lisp-like syntax than CL:LOOP.
|Source code repository|
ITERATE is much more powerful than LOOP and has a more lispy syntax.
;;; Some examples (iterate (for i from 1 to 10) (when (oddp i) (collect (* i i)))) =>(1 9 25 49 81) (iterate (for i from 1 to 5) (collect (* i i))) =>(1 4 9 16 25) >(iterate (for x in '(1 2 -3 -2)) (finding x maximizing (abs x))) =>-3
You must be logged to add a note
You must be logged to add a comment