tweak calc improvements
[lambda.git] / advanced_topics / calculator_improvements.mdwn
index 720d961..541e695 100644 (file)
@@ -585,7 +585,7 @@ In the present implementation, we separate the roles of the `bound_value` and `e
         
        type store = expressed_value list;;
 
-Our evaluation function still interacts with a `store` argument in much the same way it did with explicit-style mutation. The clause for `Variable ...` works differently, because all `expressed_value`s now need to be retrieved from the `store`:
+Our evaluation function still interacts with a `store` argument in much the same way it did with explicit-style mutation. The clause for `Variable (...)` works differently, because all `expressed_value`s now need to be retrieved from the `store`:
         
        let rec eval (t : term) (g : assignment) (s : store) = match t with
        ...
@@ -655,7 +655,7 @@ Finally, here is the clause for `Change (...)`, which takes over the role earlie
                in eval t3 g s''
        ;;
 
-Note that because the `savedg` component of a `Closure` keeps track of which `index`es in the store free variables were bound to, the values at those `index`es can later be changed, and later applications of the `Closure` will use the changed values.
+Note that because the `savedg` component of a `Closure` keeps track of which `index`es in the store---rather than which values---free variables were bound to, the values at those `index`es can later be changed, and later applications of the `Closure` will use the changed values.
 
 The complete code is available [here](/code/calculator/calc6.ml).