[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Closure of lexical environment in Scheme closures
- From: Quinn Tyler Jackson <quinn-j@...>
- Date: Thu, 11 Nov 2004 22:11:34 -0800
> Aha! So, it takes a snapshot of all of the current bindings of all of
> the local variables in the lexical environment. Sounds clear to me.
> The bindings of the variables are the values of the variables, not the
> addresses that the names point to. I sure hope nobody's disputing that.
OK. I've been following this topic.
What is the expected output of the following snippet if the function
returned by get_function is a closure?
k = 0;
k = k + 1;
return x + 10;
function get_function(x, y)
z = n(x);
f = get_function(100, 100);
print ("n called " .. k .. " times");
Quinn Tyler Jackson