Книги автора: Practical Common Lisp
Книга: Practical Common Lisp
The Parts of a LOOP
The Parts of a LOOP
You can do the following in a LOOP
:
• Step variables numerically and over various data structures
• Collect, count, sum, minimize, and maximize values seen while looping
• Execute arbitrary Lisp expressions
• Decide when to terminate the loop
• Conditionally do any of these
Additionally, LOOP
provides syntax for the following:
• Creating local variables for use within the loop
• Specifying arbitrary Lisp expressions to run before and after the loop proper
The basic structure of a LOOP
is a set of clauses, each of which begins with a loop keyword.[234] How each clause is parsed by the LOOP
macro depends on the keyword. Some of the main keywords, which you saw in Chapter 7, are for
, collecting
, summing
, counting
, do
, and finally
.
Оглавление статьи/книги
Похожие страницы
- Unconditional Execution
- 22. LOOP for Black Belts
- Looping Over Collections and Packages
- Iteration Control
- 4.4.4 The Dispatcher
- About the author
- Chapter 7. The state machine
- Appendix E. Other resources and links
- Example NAT machine in theory
- The final stage of our NAT machine
- Compiling the user-land applications
- The conntrack entries