so what it seems to boil down to is the order of these 2 operations:
If you do 2, then 1, you substitute all occurences of z with 'y first, then build the lambda, evaluating as you go... So then if you tried to print z afterwards it would evaluate to 'x because that's the last thing it got. So I think the first is dynamic scoping and the second is lexical. Make sense? --TL |
My Evaluator by Mamun Tanveer, 2001, Nov 18
It's the order of substitution vs. application of the function by Mike O'Donnell, 2001, Nov 19
to: