1
@node Iteration and Tests, User Interface, Structures, Top
2
@chapter Iteration and Tests
4
@deffn {Macro} DO-EXTERNAL-SYMBOLS
9
(do-external-symbols (var [package [result-form]])
10
@{decl@}* @{tag | statement@}*)
13
Executes STATEMENTs once for each external symbol in the PACKAGE (which
14
defaults to the current package), with VAR bound to the current symbol.
15
Then evaluates RESULT-FORM (which defaults to NIL) and returns the value(s).
20
@deffn {Special Form} DO*
25
(do* (@{(var [init [step]])@}*) (endtest @{result@}*)
26
@{decl@}* @{tag | statement@}*)
29
Just like DO, but performs variable bindings and assignments in serial, just
30
like LET* and SETQ do.
35
@deffn {Macro} DO-ALL-SYMBOLS
40
(do-all-symbols (var [result-form]) @{decl@}* @{tag | statement@}*)
43
Executes STATEMENTs once for each symbol in each package, with VAR bound to
44
the current symbol. Then evaluates RESULT-FORM (which defaults to NIL) and
50
@defun YES-OR-NO-P (&optional (format-string nil) &rest args)
53
Asks the user a question whose answer is either 'YES' or 'NO'. If FORMAT-
54
STRING is non-NIL, then FRESH-LINE operation is performed, a message is
55
printed as if FORMAT-STRING and ARGs were given to FORMAT, and then a prompt
56
"(Yes or No)" is printed. Otherwise, no prompt will appear.
61
@defun MAPHASH #'hash-table
64
For each entry in HASH-TABLE, calls FUNCTION on the key and value of the
70
@defun MAPCAR (fun list &rest more-lists)
73
Applies FUN to successive cars of LISTs and returns the results as a list.
78
@deffn {Special Form} DOLIST
83
(dolist (var listform [result]) @{decl@}* @{tag | statement@}*)
86
Executes STATEMENTs, with VAR bound to each member of the list value of
87
LISTFORM. Then returns the value(s) of RESULT (which defaults to NIL).
95
Returns T if X and Y are the same identical object; NIL otherwise.
103
Returns T if X and Y are EQUAL, if they are characters and satisfy CHAR-EQUAL,
104
if they are numbers and have the same numerical value, or if they have
105
components that are all EQUALP. Returns NIL otherwise.
113
Returns T if X and Y are EQL or if they are of the same type and corresponding
114
components are EQUAL. Returns NIL otherwise. Strings and bit-vectors are
115
EQUAL if they are the same length and have identical components. Other
116
arrays must be EQ to be EQUAL.
121
@deffn {Macro} DO-SYMBOLS
126
(do-symbols (var [package [result-form]]) @{decl@}* @{tag |
130
Executes STATEMENTs once for each symbol in the PACKAGE (which defaults to
131
the current package), with VAR bound to the current symbol. Then evaluates
132
RESULT-FORM (which defaults to NIL) and returns the value(s).
137
@deffn {Special Form} LOOP
145
Executes FORMs repeatedly until exited by a THROW or RETURN. The FORMs are
146
surrounded by an implicit NIL block.