Clause | Options | Desc |
---|---|---|
INITIALLY | Lisp forms to execute before loop starts | |
AFTER-EACH | Lisp forms to execute after each iteration | |
ELSE | Lisp forms to execute if the loop is never entered | |
FINALLY | Lisp forms to execute after loop ends | |
FINALLY-PROTECTED | Lisp forms in an UNWIND-PROTECT after loop ends | |
IF-FIRST-TIME | Evaluate branch depending on whether this clause if met for the first time | |
FIRST-TIME-P | True when evaluated for the first time | |
FIRST-ITERATION-P | True within first iteration through the body | |
IN | Process forms in a named Iterate block | |
ACCUMULATE BY | &OPTIONAL INITIAL-VALUE INTO | Generalized accumulation |
NUNIONING | &OPTIONAL INTO AT TEST | Union into a list, destructively |
UNIONING | &OPTIONAL INTO AT TEST | Union into a list |
APPENDING | &OPTIONAL INTO AT | Append into a list |
NCONCING | &OPTIONAL INTO AT | Nconc into a list |
ADJOINING | &OPTIONAL INTO AT TEST RESULT-TYPE | Adjoin into a list (tests for membership first) |
COLLECT | &OPTIONAL INTO AT RESULT-TYPE | Collect into a list |
FINDING MINIMIZING | &OPTIONAL INTO | Return value which minimizes expression |
FINDING MAXIMIZING | &OPTIONAL INTO | Return value which maximizes expression |
FINDING SUCH-THAT | &OPTIONAL INTO ON-FAILURE | Return expression when test is non-nil |
THEREIS | Return value of expression as soon as it is non-nil | |
NEVER | Return T iff expression is never non-nil | |
ALWAYS | Return last value iff expression is always non-nil | |
UNTIL | Exit loop if test is non-nil | |
WHILE | Exit loop if test is nil | |
MINIMIZE | &OPTIONAL INTO | Minimize value of an expression |
MAXIMIZE | &OPTIONAL INTO | Maximize value of an expression |
REDUCING BY | &OPTIONAL INITIAL-VALUE INTO | Generalized reduction |
MULTIPLY | &OPTIONAL INTO | Multiply into a variable |
SUM | &OPTIONAL INTO | Sum into a variable |
COUNTING | &OPTIONAL INTO | Increment a variable if expression is non-nil |
WITH | &OPTIONAL = | Bind a variable |
FOR PREVIOUS | &OPTIONAL INITIALLY BACK | Previous value of a variable |
FOR FIRST THEN | Set var on first, and then on subsequent iterations | |
FOR = | Set a variable on each iteration | |
FOR INITIALLY THEN | Set var initially, then on subsequent iterations | |
FOR DO-NEXT | General driver; VAR must be set in DO-NEXT | |
FOR NEXT | General driver; VAR is set to value of NEXT | |
FOR IN-STREAM | &OPTIONAL USING | Forms in a stream (which will be closed at the end) |
FOR IN-FILE | &OPTIONAL USING | Forms in a file |
FOR IN-PACKAGE | &OPTIONAL EXTERNAL-ONLY | Symbols accessible in a package |
FOR IN-PACKAGES | &OPTIONAL HAVING-ACCESS | Symbols and their access-types in packages |
FOR IN-HASHTABLE | Elements and keys of a hashtable | |
FOR INDEX-OF-STRING | &OPTIONAL FROM UPFROM DOWNFROM TO DOWNTO ABOVE BELOW BY WITH-INDEX | Indices of a string |
FOR IN-STRING | &OPTIONAL FROM UPFROM DOWNFROM TO DOWNTO ABOVE BELOW BY WITH-INDEX | Characters in a string |
FOR INDEX-OF-SEQUENCE | &OPTIONAL FROM UPFROM DOWNFROM TO DOWNTO ABOVE BELOW BY WITH-INDEX | Indices of a sequence (vector or list) |
FOR IN-SEQUENCE | &OPTIONAL FROM UPFROM DOWNFROM TO DOWNTO ABOVE BELOW BY WITH-INDEX | Elements of a sequence (vector or list) |
FOR INDEX-OF-VECTOR | &OPTIONAL FROM UPFROM DOWNFROM TO DOWNTO ABOVE BELOW BY WITH-INDEX | Indices of a vector |
FOR IN-VECTOR | &OPTIONAL FROM UPFROM DOWNFROM TO DOWNTO ABOVE BELOW BY WITH-INDEX | Elements of a vector |
FOR IN | &OPTIONAL BY | Elements of a list |
FOR | &OPTIONAL FROM UPFROM DOWNFROM TO DOWNTO ABOVE BELOW BY WITH-INDEX | Numbers |
FOR ON | &OPTIONAL BY | Sublists of a list |
REPEAT | Repeat the loop some number of times | |
NEXT | Explicitly step a driver variable | |
HU.DWIM.UTIL::ORING | &OPTIONAL INTO | |
HU.DWIM.UTIL::ANDING | &OPTIONAL INTO | |
HU.DWIM.UTIL::SUMMING* | &OPTIONAL INTO | Sum into a variable when expr evaluates to non nil at least once, otherwise nil |
FOR INDEX-OF-MARRAY | &OPTIONAL FROM UPFROM DOWNFROM TO DOWNTO ABOVE BELOW BY WITH-INDEX | Indices of marray |
FOR IN-MARRAY | &OPTIONAL FROM UPFROM DOWNFROM TO DOWNTO ABOVE BELOW BY WITH-INDEX | Elements of an marray |
Created
October 4, 2012 06:12
-
-
Save danlentz/3831737 to your computer and use it in GitHub Desktop.
Iterate Clauses
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment