Common Lisp the Language, 2nd Edition


next up previous contents index
Next: Data Types Up: Loop Previous: Unconditional Execution

26.12. Miscellaneous Features

change_begin
The Loop Facility provides the named construct to name a loop so that the Common Lisp special form return-from can be used.

The loop keywords initially and finally designate loop constructs that cause expressions to be evaluated before and after the loop body, respectively.

The code for any initially clauses is collected into one progn in the order in which the clauses appeared in the loop. The collected code is executed once in the loop prologue after any implicit variable initializations.

The code for any finally clauses is collected into one progn in the order in which the clauses appeared in the loop. The collected code is executed once in the loop epilogue before any implicit values are returned from the accumulation clauses. Explicit returns in the loop body, however, will exit the loop without executing the epilogue code.


change_end



AI.Repository@cs.cmu.edu