X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=advanced_topics%2Fcalculator_improvements.mdwn;h=d3beef126002eea1d63aeb8b753090a21713a682;hp=7576b22e2df86a69b8c44f1aceaddd120944513c;hb=d60496c400a5ec0e5236cfb8137c6a0748688d99;hpb=8851b9a8232b479f166c711beae3cc6a665b047c diff --git a/advanced_topics/calculator_improvements.mdwn b/advanced_topics/calculator_improvements.mdwn index 7576b22e..d3beef12 100644 --- a/advanced_topics/calculator_improvements.mdwn +++ b/advanced_topics/calculator_improvements.mdwn @@ -661,7 +661,7 @@ The complete code is available [here](/code/calculator/calc6.ml). ##Adding Aliasing and Passing by Reference## -Next we'll add aliasing as described at the end of [[week9]]. We'll also add the ability to pass (implicit) reference cells as arguments to a function, which lets changes made within the function body to be effective in the outside environment. When we discussed this in [[week9]], we proposed a different syntactic form for the function values that get called in this way. Instead of: +Next we'll add aliasing as described at the end of [[week9]]. We'll also add the ability to pass (implicit) reference cells as arguments to a function, which lets changes made within the function body be effective in the outside environment. When we discussed this in [[week9]], we proposed a different syntactic form for the function values that get called in this way. Instead of: let f = lambda (y) -> ... ... @@ -681,15 +681,15 @@ Real programming languages that have this ability, such as C++, do something ana in f y In our present framework, it will be easier to do things differently. We will -introduce a new syntactic forms at the location where a function value is -applied, rather than in the function's declaration. So we will say instead: +introduce a new syntactic form at the location where a function value is +applied, rather than in the function's declaration. We say: Let ('f', Lambda ('y', ...), ... Apply(Variable 'f', Variable 'x')...) -for the familiar, passing-by-value behavior, and: +for the familiar, passing-by-value behavior, and will instead say: Let ('f', Lambda ('y', ...),