iterate
Jonathan Amsterdam's iterator/gatherer/accumulator facility
ITERATE
-
Macro
ITERATE
(&body body)Jonathan Amsterdam's powerful iteration facility -
Macro
ITER
(&body body &environment env)Jonathan Amsterdam's powerful and extensible iteration facility, providing multiple accumulation, generators, memory of previous iterations, over 50 clauses to start with and a Lisp-like syntax. Evaluate (iterate:display-iterate-clauses) for an overview of clauses -
Macro
DEFMACRO-CLAUSE
(clause-template &body body)Create your own iterate clauses -
Macro
DEFMACRO-DRIVER
(clause-template &body body)Create iterators which may also be used as generators -
Function
DISPLAY-ITERATE-CLAUSES
(&optional clause-spec) -
Macro
DEFSYNONYM
(syn word)Makes SYN a synonym for the existing iterate keyword WORD. -
Macro
DEFCLAUSE-SEQUENCE
(element-name index-name &key access-fn size-fn element-type sequence-type element-doc-string index-doc-string)A simple way to define a simple FOR ... &sequence clause -
Macro
DSETQ
(template value)Destructuring assignment; supports both (VALUES ...) for destructuring a multiple-value form and NIL as a variable name, meaning to ignore that position, e.g. (DSETQ (VALUES (a . b) nil c) form) -
Function
INITIALLY
(&rest forms)Lisp forms to execute before loop starts -
Function
AFTER-EACH
(&rest forms)Lisp forms to execute after each iteration -
Function
ELSE
(&rest forms)Lisp forms to execute if the loop is never entered -
Function
FINALLY
(&rest forms)Lisp forms to execute after loop ends -
Function
FINALLY-PROTECTED
(&rest forms)Lisp forms in an UNWIND-PROTECT after loop ends -
Function
IF-FIRST-TIME
(then &optional else)Evaluate branch depending on whether this clause is met for the first time -
Function
FIRST-TIME-P
True when evaluated for the first time -
Function
FIRST-ITERATION-P
True within first iteration through the body -
Function
IN
(block-name &rest forms)Process forms in a named Iterate block -
Function
NEXT
(var &optional (n 1))Explicitly step a driver variable -
Macro
FINISH
Leave the loop gracefully, executing the epilogue -
Macro
TERMINATE
Use within FOR ... DO-/NEXT clause to end the iteration -
Macro
NEXT-ITERATION
Begin the next iteration -
Macro
LEAVE
(&optional value)Exit the loop without running the epilogue code