2.5 Function Types

EVAL type functions are those which are invoked with evaluated arguments. NOEVAL functions are invoked with unevaluated arguments. SPREAD type functions have their arguments passed in one-to-one correspondence with their formal parameters. NOSPREAD functions receive their arguments as a single list. EVAL, SPREAD functions are associated with EXPRs and NOEVAL, NOSPREAD functions with FEXPRs. EVAL, NOSPREAD and NOEVAL, SPREAD functions can be simulated using NOEVAL, NOSPREAD functions or MACROs.

EVAL, SPREAD type functions may have a maximum of 15 parameters. There is no limit on the number of parameters a NOEVAL, NOSPREAD function or MACRO may have.

In the context of the description of an EVAL, SPREAD function, then we speak of the formal parameters we mean their actual values. However, in a NOEVAL, NOSPREAD function it is the unevaluated actual parameters.

A third function type, the MACRO, implements functions which create S-expressions based on actual parameters. When a macro invocation is encountered, the body of the macro, a lambda expression, is invoked as a NOEVAL, NOSPREAD function with the macro’s invocation bound as a list to the macros single formal parameter. When the macro has been evaluated the resulting S-expression is reevaluated. The description of the EVAL and EXPAND functions provide precise details.