_defined(b: binding, name: text): bool

If name is the empty string, returns ERR. Otherwise, returns TRUE if the binding b contains a pair <n, v> with n identical to name, and FALSE otherwise.

_defined([ foo = 1, bar = TRUE ], "foo") == TRUE
_defined([ foo = 1, bar = TRUE ], "dave") == FALSE
_defined([ foo = 1, bar = TRUE ], "") == ERR           // Empty string produces ERR

_lookup(b: binding, name: text): any

If name is the empty string, returns ERR. If name is defined in b, returns the value associated with it; otherwise, returns ERR. Note that the value associated with name may be of any type, including err, so a result of ERR does not necessarily imply that _defined(b, name) is FALSE.

_lookup([ foo = 1, bar = TRUE ], "foo") == 1
_lookup([ foo = 1, bar = TRUE ], "dave") == ERR       // No binding for "dave"
_lookup([ foo = 1, bar = TRUE ], "") == ERR           // Empty string produces ERR
_lookup([ foo = 1, bar = ERR ], "bar") == ERR         // "bar" bound to ERR

Kenneth C. Schalk <ken@xorian.net> / Primitive Functions / Vesta SDL Programmer's Reference