From: barker Date: Mon, 13 Sep 2010 13:41:51 +0000 (-0400) Subject: (no commit message) X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=97fd9ed2423e6c6d9e0dabdce6bc334f8439637f --- diff --git a/assignment1.mdwn b/assignment1.mdwn index dd1fa12c..93136f22 100644 --- a/assignment1.mdwn +++ b/assignment1.mdwn @@ -1,4 +1,5 @@ -**Reduction** +Reduction +--------- Find "normal forms" for the following (that is, reduce them as far as it's possible to reduce them): @@ -12,7 +13,8 @@ them): 7. (\x (x x x)) (\x (x x x)) -**Booleans** +Booleans +-------- Recall our definitions of true and false. @@ -24,7 +26,7 @@ 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". +8. [8] Define a "neg" operator that negates "true" and "false". Expected behavior: (((neg true) 10) 20) @@ -35,9 +37,9 @@ evaluates to 20, and evaluates to 10. -* 9. Define an "and" operator. +9. [9] Define an "and" operator. -* 10. Define an "xor" operator. (If you haven't seen this term before, here's a truth table: +10. [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