Process data with LOOP and iterate in Common Lisp
8 steps · about 3 h 10 min · Intermediate
- Control Flow in Common Lisp (tutorial, Code Archaeology, 20 min)
It starts with dotimes, dolist and a first taste of loop, so you know the simpler forms before the loop mini-language.
- The Common Lisp Cookbook - The Powerful 'loop' Macro (guide, Common Lisp Cookbook, 15 min)
Short worked examples of for, collect, when and return give you a feel for how loop reads.
- Tutorial for the Common Lisp Loop Macro (tutorial, Peter Karp, SRI, 25 min)
It breaks a loop into setup, termination tests, per-iteration actions and finishing actions, which gives you a mental model for the rest of the list.
- 22. LOOP for Black Belts (guide, Peter Seibel, Practical Common Lisp, 45 min)
This is the authoritative walkthrough of iteration control, accumulation, conditionals and the prologue and epilogue order.
- common-lisp Tutorial - LOOP, a Common Lisp macro for iteration (reference, Stack Overflow Documentation, 25 min)
It adds practical idioms such as destructuring, sliding windows and iterating over hash tables and packages.
- The Common Lisp Cookbook – Loop, iteration, mapping (guide, Common Lisp Cookbook, 30 min)
It puts loop and iterate side by side and shows how to load iterate with Quicklisp, plus the gotchas.
- Loops in Lisp Part 3: Iterate (blog, malisper.me, 15 min)
It explains why iterate is more Lispy and extensible, and shows how to define your own clause with defmacro-clause.
- 2.9.1 Advanced iteration methods (reference, LispWorks documentation, 15 min)
It covers iterating over sequences, strings, vectors and package symbols, for data that isn't a plain list.