X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2Fweek1.mdwn;h=f47cd857961d11856994b814f5b325481c8210de;hp=446d7a724fc609ec45a7b253c1505873d92ecc93;hb=61287ba954f811a7fa9deda5291144a1bb58519b;hpb=d287d7719b3b2b0418e8b00b7fd2ec306fd3ec5a diff --git a/topics/week1.mdwn b/topics/week1.mdwn index 446d7a72..f47cd857 100644 --- a/topics/week1.mdwn +++ b/topics/week1.mdwn @@ -70,6 +70,7 @@ will be just another way to write: You see that you can use parentheses in the standard way. By the way, `<=` means ≤ or "less than or equals to", and `>=` means ≥. Just in case you haven't seen them written this way before. + I've started throwing in some **variables**. We'll say variables are any expression that's written with an initial lower-case letter, then is followed by a sequence of zero or more upper- or lower-case letters, or numerals, or underscores (`_`). Then at the end you can optionally have a `?` or `!` or a sequence of `'`s, understood as "primes." Hence, all of these are legal variables: x @@ -636,7 +637,7 @@ We've also talked about a variety of **expressions** in our language, that evalu * All of the literal atoms and literal containers * Variables * Complex expressions that apply `&` or some variable understood to be bound to a function to some arguments -* Various other complex expressions involving λ or `let` or `letrec` or `case` +* Various other complex expressions involving the keywords λ or `let` or `letrec` or `case` The special syntaxes `[10, 20, 30]` are just shorthand for the more offical syntax using `&` and `[]`, and likewise for `{10, 20, 30}`. The `if ... then ... else ...` syntax is just shorthand for a `case`-construction using the literal patterns `'true` and `'false`.