December 2021
Beginner
840 pages
47h 29m
English
The presence of first-class procedures makes the determination of the declaration to which a nonlocal reference binds more complex than in languages without support for first-class procedures. The question is: Which environment should be used to supply the value of a nonlocal reference in the body of a passed or returned function? There are three options:
deep binding uses the environment at the time the passed function was created
shallow binding uses the environment of the expression that invokes the passed function
ad hoc binding uses the environment of the invocation expression in which the procedure is passed as an argument
Consider the following Scheme expression:
The function ...