(no commit message)
[lambda.git] / assignment1.mdwn
index 4980cc2..313db95 100644 (file)
@@ -1,18 +1,18 @@
-*Reduction*
+**Reduction**
 
 Find "normal forms" for the following (that is, reduce them as far as it's possible to reduce 
 them):
 
-1. (\x \y. y x) z
-2. (\x (x x)) z
-3. (\x (\x x)) z
-4. (\x (\z x)) z
-5. (\x (x (\y y))) (\z (z z))
-6. (\x (x x)) (\x (x x))
-7. (\x (x x x)) (\x (x x x))
+    1. (\x \y. y x) z
+    2. (\x (x x)) z
+    3. (\x (\x x)) z
+    4. (\x (\z x)) z
+    5. (\x (x (\y y))) (\z (z z))
+    6. (\x (x x)) (\x (x x))
+    7. (\x (x x x)) (\x (x x x))
 
 
-*Booleans*
+**Booleans**
 
 Recall our definitions of true and false.
 
@@ -24,14 +24,14 @@ In Racket, these can be defined like this:
        (define true (lambda (t) (lambda (f) t)))
        (define false (lambda (t) (lambda (f) f)))
 
-
-8. Define a "neg" operator that negates "true" and "false".
-Expeceted behavior: (((neg true) 10) 20) evaluates to 20,
+(8). Define a "neg" operator that negates "true" and "false".
+Expected behavior: (((neg true) 10) 20) evaluates to 20,
 (((neg false) 10) 20) evaluates to 10.
 
-9. Define an "and" operator.
+(9). Define an "and" operator.
 
 10. Define an "xor" operator. (If you haven't seen this term before, here's a truth table:
+
        true xor true = false
        true xor false = true
        false xor true = true
@@ -44,6 +44,7 @@ one of those values, call it a black-or-white-value, we should be able to
 write:
 
        the-black-or-white-value if-black if-white
+
 (where if-black and if-white are anything), and get back one of if-black or
 if-white, depending on which of the black-or-white values we started with. Give
 a definition for each of "black" and "white". (Do it in both lambda calculus