136 |
procedures these are used from. The items in @var{rest-arg} are |
procedures these are used from. The items in @var{rest-arg} are |
137 |
sequentially bound to the variable names are given. When @var{rest-arg} |
sequentially bound to the variable names are given. When @var{rest-arg} |
138 |
runs out, the remaining vars are bound either to the default values or |
runs out, the remaining vars are bound either to the default values or |
139 |
left unbound if no default value was specified. @var{rest-arg} remains |
@code{#f} if no default value was specified. @var{rest-arg} remains |
140 |
bound to whatever may have been left of @var{rest-arg}. |
bound to whatever may have been left of @var{rest-arg}. |
141 |
|
|
142 |
After binding the variables, the expressions @var{expr} @dots{} are |
After binding the variables, the expressions @var{expr} @dots{} are |
211 |
creates a procedure with fixed arguments @var{a} and @var{b}, optional |
creates a procedure with fixed arguments @var{a} and @var{b}, optional |
212 |
arguments @var{c} and @var{d}, and rest argument @var{e}. If the |
arguments @var{c} and @var{d}, and rest argument @var{e}. If the |
213 |
optional arguments are omitted in a call, the variables for them are |
optional arguments are omitted in a call, the variables for them are |
214 |
unbound in the procedure. This can be checked with the @code{bound?} |
bound to @code{#f}. |
|
macro (documented below). |
|
215 |
|
|
216 |
@code{lambda*} can also take keyword arguments. For example, a procedure |
@code{lambda*} can also take keyword arguments. For example, a procedure |
217 |
defined like this: |
defined like this: |
262 |
for refugees from other Lisp dialects. |
for refugees from other Lisp dialects. |
263 |
@end deffn |
@end deffn |
264 |
|
|
|
@deffn {library syntax} bound? variable |
|
|
Check if a variable is bound in the current environment. |
|
|
|
|
|
The procedure @code{defined?} doesn't quite cut it as it stands, since |
|
|
it only checks bindings in the top-level environment, not those in local |
|
|
scope only. |
|
|
@end deffn |
|
|
|
|
265 |
|
|
266 |
@node define* Reference |
@node define* Reference |
267 |
@subsection define* Reference |
@subsection define* Reference |