Tutorial by Examples

dotimes is a macro for integer iteration over a single variable from 0 below some parameter value. One of the simples examples would be: CL-USER> (dotimes (i 5) (print i)) 0 1 2 3 4 NIL Note that NIL is the returned value, since we did not provide one ourselves; the v...
dolist is a looping macro created to easily loop through the lists. One of the simplest uses would be: CL-USER> (dolist (item '(a b c d)) (print item)) A B C D NIL ; returned value is NIL Note that since we did not provide return value, NIL is returned (and A,B,C,D are ...
The loop macro has two forms: the "simple" form and the "extended" form. The extended form is covered in another documentation topic, but the simple loop is useful for very basic loop. The simple loop form takes a number of forms and repeats them until the loop is exited using ...

Page 1 of 1