Previous: Internal Definitions, Up: Binding Constructs

5.10.4 Querying variable bindings

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

— Scheme Procedure: defined? sym [env]
— C Function: scm_defined_p (sym, env)

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.