1.1 About the Loop Facility
loopmacro. For the sake of convenience, references to the
loopmacro that follow denote the
loopmacro as part of the Loop Facility, not the Common Lisp
loopmacro. In discussions that concern the macro itself and not an extended construct,
loopappears in boldface.
The evaluation of the
loop macro occurs first through macro expansion. When Lisp encounters a
loop macro call form, it invokes the Loop Facility and passes to it the loop clauses as a list of unevaluated forms, as with any macro. 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 expanded form consists of three basic parts in the tagbody:
Expansion of the
loop macro produces an implicit block (named
nil). Thus, the Common Lisp macro
return and the special form
return-from can be used to return values from a loop or to exit a loop.
Generated with Harlequin WebMaker