mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 04:10:18 +02:00
Don't talk about 'bound?' which is gone. Thanks to Christopher
Cramer.
This commit is contained in:
parent
0f8ae50a81
commit
77c16d8343
2 changed files with 3 additions and 14 deletions
|
@ -263,9 +263,7 @@ with duplicate bindings.
|
||||||
@section Querying variable bindings
|
@section Querying variable bindings
|
||||||
|
|
||||||
Guile provides a procedure for checking whether a symbol is bound in the
|
Guile provides a procedure for checking whether a symbol is bound in the
|
||||||
top level environment. If you want to test whether a symbol is locally
|
top level environment.
|
||||||
bound in expression, you can use the @code{bound?} macro from the module
|
|
||||||
@code{(ice-9 optargs)}, documented in @ref{Optional Arguments}.
|
|
||||||
|
|
||||||
@c NJFIXME explain [env]
|
@c NJFIXME explain [env]
|
||||||
@deffn {Scheme Procedure} defined? sym [env]
|
@deffn {Scheme Procedure} defined? sym [env]
|
||||||
|
|
|
@ -136,7 +136,7 @@ the scsh macros of the same name, but are slightly extended. Each of
|
||||||
procedures these are used from. The items in @var{rest-arg} are
|
procedures these are used from. The items in @var{rest-arg} are
|
||||||
sequentially bound to the variable names are given. When @var{rest-arg}
|
sequentially bound to the variable names are given. When @var{rest-arg}
|
||||||
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
|
||||||
left unbound if no default value was specified. @var{rest-arg} remains
|
@code{#f} if no default value was specified. @var{rest-arg} remains
|
||||||
bound to whatever may have been left of @var{rest-arg}.
|
bound to whatever may have been left of @var{rest-arg}.
|
||||||
|
|
||||||
After binding the variables, the expressions @var{expr} @dots{} are
|
After binding the variables, the expressions @var{expr} @dots{} are
|
||||||
|
@ -211,8 +211,7 @@ parameter list, but before any dotted rest argument. For example,
|
||||||
creates a procedure with fixed arguments @var{a} and @var{b}, optional
|
creates a procedure with fixed arguments @var{a} and @var{b}, optional
|
||||||
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
|
||||||
optional arguments are omitted in a call, the variables for them are
|
optional arguments are omitted in a call, the variables for them are
|
||||||
unbound in the procedure. This can be checked with the @code{bound?}
|
bound to @code{#f}.
|
||||||
macro (documented below).
|
|
||||||
|
|
||||||
@code{lambda*} can also take keyword arguments. For example, a procedure
|
@code{lambda*} can also take keyword arguments. For example, a procedure
|
||||||
defined like this:
|
defined like this:
|
||||||
|
@ -263,14 +262,6 @@ more similarity to DSSSL, MIT-Scheme and Kawa among others, as well as
|
||||||
for refugees from other Lisp dialects.
|
for refugees from other Lisp dialects.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
@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
|
|
||||||
|
|
||||||
|
|
||||||
@node define* Reference
|
@node define* Reference
|
||||||
@subsection define* Reference
|
@subsection define* Reference
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue