X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2Fweek2_lambda_intro.mdwn;h=4b0917529eb8041f64e6e43f42de0c2cad17de54;hp=091e1234dbaef36e5cd163b03bacad2eac19dbc1;hb=020566910974049e4cd9cbc9279a781768e1817c;hpb=b6e2ba40d18b2c1efb84e764d0e07d7f97d57319 diff --git a/topics/week2_lambda_intro.mdwn b/topics/week2_lambda_intro.mdwn index 091e1234..4b091752 100644 --- a/topics/week2_lambda_intro.mdwn +++ b/topics/week2_lambda_intro.mdwn @@ -228,7 +228,12 @@ abbreviates: ((\x (\y (x y))) x) -We didn't have to insert any parentheses around the inner body of `\y. (x y)` because they were already there. +The outermost parentheses were added because we have an application. `(\x. \y. +...)` became `(\x (\y. ...))` because of the rule for dots. We didn't have to +insert any parentheses around the inner body of `\y. (x y)` because they were +already there. That is, in expressions of the form `\y. (...)`, the dot abbreviates +nothing. It's harmless to write such a dot, though, and it can be conceptually +helpful especially in light of the next convention... **Merging lambdas** An expression of the form `(\x (\y M))`, or equivalently, `(\x. \y. M)`, can be abbreviated as: @@ -312,7 +317,7 @@ are distinct lambda expressions: (\z z) -yet when applied to any argument M, all of these will always return M. So they +yet when applied to any argument `M`, all of these will always return `M`. So they have the same extension. It's also true, though you may not yet be in a position to see, that no other function can differentiate between them when they're supplied as an argument to it. However, these expressions are all @@ -432,7 +437,7 @@ expressions to assign values to variables. For instance, let x match 2 in (x, x) -evaluates to the ordered pair (2, 2). It may be helpful to think of +evaluates to the ordered pair `(2, 2)`. It may be helpful to think of a redex in the lambda calculus as a particular sort of `let` construction.