Page:AIM-353.djvu/36

From Wikisource
Jump to navigation Jump to search
This page has been validated.
Steele and Sussman March 10, 1976 34 LAMBDA: The Ultimate Imperative

(LABELS ((<name1> <lambda-exp1>)
         (<name2> <1ambda-exp2>)
         . . .
         (<namen> <lambda-expn>))
        <body>)

A new environment is created in which the names <namei> are bound to closures of the lambda expresisons <lambda-expi>; the lambda expressions are closed in this new environment, and so may refer to each other. The <body> is then evaluated in this new environment.

The LABEL construct of LISP 1.5:

((LABEL <name> <1ambda-exp>) <arg1> <arg2> ... <argn>)

may be written as a LABELS in SCHEME:

(LABELS ((<name> <lambda-exp>))
        (<name> <arg1> <arg2> ... <argn>))

{Landinknewthis}
In [Landin 65] Landin uses this same technique to model call-by-name. However, he modelled assignment to call-by-name parameters in a way much different from the one we use later: he uses L-values rather than an extra assignment thunk.

{Mccarthywins}
This was realized as early as 1960 by John McCarthy. In section 6 of [McCarthy 60] he describes a technique for transforming a flowchart into a purely recursive procedure.

{Muddlevcells}
The MDL language (formerly known as MUDDLE) [Galley 75] uses cached value cells, but uses a process number rather than a side effect count to determine the validity of the cache data, the purpose being to share a cache among several processes.

{Plasmafluids}
This indicates an obvious method for implementing fluid variables in PLASMA in a natural way. All that would be required is a slight change to the implicitly supplied continuations.

{Schemenote}
This is discussed in detail in [Sussman 75], where an actual implementation is described. The theoretical justification is described there, and later in this paper also.

{Schemepaper}
SCHEME is fully described in [Sussman 75], which contains a complete reference manual as well as a fully documented implementation of the language in MacLISP [Moon 74].