X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment1.mdwn;h=6fd29ee206bea5daf066f60fdef5b70da0c3b196;hp=430f3c8448b81faed7eddaa5d6c744aefbb43699;hb=ec7e61a11b6cbbfe9c6c90e6c077c430424317d0;hpb=29de81dde7a45df279dd9c2cc7b8efd44fb3ee8d diff --git a/assignment1.mdwn b/assignment1.mdwn index 430f3c84..6fd29ee2 100644 --- a/assignment1.mdwn +++ b/assignment1.mdwn @@ -1,4 +1,4 @@ -*Reduction* +**Reduction** Find "normal forms" for the following (that is, reduce them as far as it's possible to reduce them): @@ -12,7 +12,7 @@ them): 7. (\x (x x x)) (\x (x x x)) -*Booleans* +**Booleans** Recall our definitions of true and false. @@ -26,7 +26,7 @@ In Racket, these can be defined like this: 8. Define a "neg" operator that negates "true" and "false". -Expeceted behavior: (((neg true) 10) 20) evaluates to 20, +Expected behavior: (((neg true) 10) 20) evaluates to 20, (((neg false) 10) 20) evaluates to 10. 9. Define an "and" operator. @@ -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