[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Summary of message on function objects



To summarize the important points of the previous note:

The Common Lisp manual must make clear the distinction between function
objects (lexical closures and compiled-code objects) and function names
(lambda expressions and symbols), and the evaluation process which
produces function objects from function names.

The first argument to APPLY or FUNCALL (for which FUNCTIONP is
true) must be a compiled-code object or a lexical closure.  Anything
else is an error.

Lexical environments are Lisp objects which need a section in the data
types chapter.  ENCLOSE takes a lambda expression and a lexical
environment and returns a lexical closure.  CLOSURE-EXPRESSION takes a
lexical closure and returns the lambda expression which it encloses.
CLOSURE-ENVIRONMENT takes a lexical closure and returns the lexical
environment it was closed over.