Holy-Elie Scaide

Loops in Common Lisp

The loop macro introduce a special Domain-specific language for iteration consisting of multiple clauses. These clauses can be classified into multiple patterns

  • Variables initialization:
    • Once with with,
    • While iterating with for|as,
  • Forms evaluation before the iteration with initially,
  • Conditional clauses for termination,
  • Clauses for evaluating forms with some having specific actions,
  • Forms evaluation after the iteration with finally

There are great libraries for doing iterations like SERIES and iterate

#common lisp

- 0 toasts