Common Lisp the Language, 2nd Edition

Next: Iteration Control Up: Loop Previous: User Extensibility

# 26.5. Loop Constructs

The remaining sections of this chapter describe the constructs that the Loop Facility provides. The descriptions are organized according to the functionality of the constructs. Each section begins with a general discussion of a particular operation; it then presents the constructs that perform the operation.

- Section 26.6, ``Iteration Control,'' describes iteration control clauses that allow directed loop iteration.

- Section 26.7, ``End-Test Control,'' describes clauses that stop iteration by providing a conditional expression that can be tested after each execution of the loop body.

- Section 26.8, ``Value Accumulation,'' describes constructs that accumulate values during iteration and return them from a loop. This section also discusses ways in which accumulation clauses can be combined within the Loop Facility.

- Section 26.9, ``Variable Initializations,'' describes the `with` construct, which provides local variables for use within the loop body, and other constructs that provide local variables.

- Section 26.10, ``Conditional Execution,'' describes how to execute loop clauses conditionally.

- Section 26.11, ``Unconditional Execution,'' describes the `do` and `return` constructs. It also describes constructs that are used in the loop prologue and loop epilogue.

- Section 26.12, ``Miscellaneous Features,'' discusses loop data types and destructuring. It also presents constructs for naming a loop and for specifying initial and final actions.

Next: Iteration Control Up: Loop Previous: User Extensibility