Node:Binding Reflection, Previous:Internal Definitions, Up:Binding Constructs

25.4 Querying variable bindings

Guile provides a procedure for checking whether a symbol is bound in the top level environment.

defined? sym [env] Scheme Procedure
scm_definedp (sym, env) C Function
Return #t if sym is defined in the lexical environment env. When env is not specified, look in the top-level environment as defined by the current module.