Procedures

A procedure (or routine) is any object which may be called. Ordinarily, a procedure is called as a result of the evaluation of a call (page [*]). The most primitive mechanism for creating procedures is the LAMBDA special form.

Special form


\begin{inset}{}
A {\tt LAMBDA}-expression evaluates to a procedure.
When the pro...
... variable {\tt Z} that is in scope when {\it procedure\/} is called.
\end{inset}

LAMBDA-bindings do not shadow syntax table entries in the standard compiler. The standard-compiler and ORBIT, the new optimizing compiler, now have the same evaluation semantics. This is consistent with the T manual. Thus,


\begin{codexenv}
(LET ((SET LIST) (X 5)) (SET X 8)) $\Longrightarrow$\ 8 {\bf not} (5 8)
\end{codexenv}

However, this doesn't mean that the LAMBDA-binding has no effect, but rather that the binding is not recognized as such when the name appears in the CAR of a form. Thus,


\begin{codexenv}
(LET ((SET LIST) (X 5)) ((BLOCK SET) X 8)) $\Longrightarrow$\ (5 8)
\end{codexenv}

This is not a final decision. This was the easiest semantics to implement, and it is consistent with the documentation. In the future lambda bindings may shadow syntax.