Next: About this document Up: classnote 20 Previous: Environment Semantics

Environments

Now consider the evaluation of . Intuitively we get





This corresponds to the lazy evaluation of












We can imagine using environments even in the final step. For example, as we compute we get to . We could now say

let ~in ~.

Then we look up and evaluate .

Now in evaluating this application there are many choices. We need a value for and we could just look it up in the environment to get

.

This is clearly wrong. What happened?

Next time we will examine a way to use environments at each step and yet get the right answer, .


pavel@
Mon Oct 31 11:39:34 EST 1994