The loop clauses contain Common Lisp forms and loop keywords. The loop keywords are recognized by their symbol name, regardless of the packages that contain them. The loop macro translates the given form into Common Lisp code and returns the expanded form. The expanded loop form is one or more lambda-expressions for the local binding of loop variables and a block and a tagbody that express a looping control structure. The variables established in the loop construct are bound as if by using let or lambda .
Implementations can interleave the setting of initial values with the bindings.
However, the assignment of the initial values is always calculated in the order specified by the user. A variable is thus sometimes bound to a harmless value of the correct data type, and then later in the prologue it is set to the true initial value by using setq . The loop body contains those forms that are executed during iteration, including application-specific calculations, termination tests, and variable stepping. Stepping is the process of assigning a variable the next item in a series of items. The loop epilogue contains forms that are executed after iteration terminates, such as code to return values from the loop.