On Wed, Dec 1, 2010 at 5:25 PM, David Van Horn <dvanh...@ccs.neu.edu> wrote: > > > An evaluator can implement function application using substitution, i.e. > you can evaluate ((lambda (x) e) v) by evaluating the substitution of v for > x in e. > > Or, you can be lazy and defer the substitution. In that case, you evaluate > ((lambda (x) e) v) by evaluating e; you just have to remember that v should > have been substituted for x should you ever get to evaluating x. The data > structure you use to remember those deferred substitutions is an > environment. A simple list of variable, value pairs is a suitable > representation. >
Thanks - I have read the substitution part of PLAI and thought of using substitution as well, but it seems that substitution does not constitute the full solution: - it only work with side-effect free code - it does not address closure Maybe I am looking too far ahead, but it seems like I cannot get away from needing my own call stack? Or am I missing something? Thanks, yc
_________________________________________________ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users