Common Lisp the Language, 2nd Edition
Next: Named Functions
Up: Program Structure
Previous: Function Calls
There are two ways to indicate a function to be used in a
function-call form. One is to use a symbol that names the function. This
use of symbols to name functions is completely independent of their use
in naming special and lexical variables. The other way is to use a
lambda-expression, which is a list whose first element is the
symbol lambda
. A lambda-expression is not a form;
it cannot be meaningfully evaluated. Lambda-expressions and symbols,
when used in programs as names of functions, can appear only as the
first element of a function-call form, or as the second element of the
function
special form. Note that symbols and
lambda-expressions are treated as names of functions in these
two contexts. This should be distinguished from the treatment of symbols
and lambda-expressions as function objects, that is, objects
that satisfy the predicate functionp
, as when giving such
an object to apply
or funcall
to be
invoked.
AI.Repository@cs.cmu.edu