X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment1.mdwn;h=cb1dfd2996a071c9f110ac1ecd4bdf7e9c5e31ac;hp=93136f22353c02033c4f263082ae015e017b1744;hb=fe9676f755081fce2220593c995e21f5e24f6c76;hpb=97fd9ed2423e6c6d9e0dabdce6bc334f8439637f diff --git a/assignment1.mdwn b/assignment1.mdwn index 93136f22..cb1dfd29 100644 --- a/assignment1.mdwn +++ b/assignment1.mdwn @@ -26,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. [8] Define a "neg" operator that negates "true" and "false". + [8] Define a "neg" operator that negates "true" and "false". Expected behavior: (((neg true) 10) 20) @@ -37,9 +37,9 @@ evaluates to 20, and evaluates to 10. -9. [9] Define an "and" operator. + [9] Define an "and" operator. -10. [10] Define an "xor" operator. (If you haven't seen this term before, here's a truth table: + [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 @@ -48,7 +48,7 @@ evaluates to 10. ) -* 11. Inspired by our definition of boolean values, propose a data structure + 11. Inspired by our definition of boolean values, propose a data structure capable of representing one of the two values "black" or "white". If we have one of those values, call it a black-or-white-value, we should be able to write: