Reading (for next class): PLP, Section 8.3. Everything from "Closures as Parameters" (p. 401) on is optional - but I think the stuff in 8.3.3 is pretty interesting and worth reading!
foo
in the following code - that is, right after the call
is made and the CRT is updated, but before the body of foo
actually starts executing. Note that because foo
is
recursive there are three such calls.
{ new x := 10; new i := 5; new foo := lambda x { if (x = 1) { ret := 3; } else { ret := 3*foo(x-1); } }; write foo(3); }