Common Lisp the Language, 2nd Edition
![]()
Next: Kinds of Loop
Up: Parsing Loop Clauses
Previous: Parsing Loop
Clauses

With the exceptions listed below, clauses are executed in the loop body
in the order in which they appear in the source. Execution is repeated
until a clause terminates the loop or until a Common Lisp
return, go, or throw form is
encountered. The following actions are exceptions to the linear order of
execution:
initially clauses is collected into
one progn in the order in which the clauses appear in the
source. The collected code is executed once in the loop prologue after
any implicit variable initializations.finally clauses is collected into one
progn in the order in which the clauses appear in the
source. The collected code is executed once in the loop epilogue before
any implicit values from the accumulation clauses are returned. Explicit
returns anywhere in the source, however, will exit the loop without
executing the epilogue code.with clause introduces a variable binding and an
optional initial value. The initial values are calculated in the order
in which the with clauses occur.
![]()
Next: Kinds of Loop
Up: Parsing Loop Clauses
Previous: Parsing Loop
Clauses
AI.Repository@cs.cmu.edu