edits
[lambda.git] / week6.mdwn
index 1839455..221e020 100644 (file)
@@ -44,9 +44,10 @@ Oh well.
 Booleans in OCAML, and simple pattern matching
 ----------------------------------------------
 
-Where we would write `true 1 2` and expect it to evaluate to `1`, in
-OCAML boolean types are not functions (equivalently, are functions
-that take zero arguments).  Choices are made as follows:
+Where we would write `true 1 2` in our pure lambda calculus and expect
+it to evaluate to `1`, in OCAML boolean types are not functions
+(equivalently, are functions that take zero arguments).  Selection is
+accomplished as follows:
 
     # if true then 1 else 2;;
     - : int = 1
@@ -69,8 +70,8 @@ Compare with
     # match 3 with 1 -> 1 | 2 -> 4 | 3 -> 9;;
     - : int = 9
 
-Unit
-----
+Unit and thunks
+---------------
 
 All functions in OCAML take exactly one argument.  Even this one:
 
@@ -135,7 +136,7 @@ Oh, one more thing: lambda expressions look like this:
     # (fun x -> x);;
     - : 'a -> 'a = <fun>
     # (fun x -> x) true;;
-    - : book = true
+    - : bool = true
 
 (But `(fun x -> x x)` still won't work.)
 
@@ -152,7 +153,7 @@ reverse the order of the arguments:
 
 Infinite loop.
 
-Now consider the following differences:
+Now consider the following variations in behavior:
 
     # let test = omega omega;;
     [Infinite loop, need to control c out]