X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment1.mdwn;h=7568717dcc67bf49a3775eb31573727bb58070f2;hp=9bb65b388d2cb6e187b7e085ddde29b9e26e82e5;hb=00ca9d64a3e95f9163545be1e0ae7845298a10c2;hpb=8f5ac0c5b7e25c726f3afb65b1fc413af8a4fa52 diff --git a/assignment1.mdwn b/assignment1.mdwn index 9bb65b38..7568717d 100644 --- a/assignment1.mdwn +++ b/assignment1.mdwn @@ -1,7 +1,7 @@ Reduction --------- -Find "normal forms" for the following---that is, reduce them until no more reductions are possible. We'll write λ`x` as `\x`. +Find "normal forms" for the following---that is, reduce them until no more reductions are possible. We'll write λx as `\x`. 1. `(\x \y. y x) z` 2. `(\x (x x)) z` @@ -17,8 +17,8 @@ Booleans Recall our definitions of true and false. -> "true" defined to be `\t \f. t` -> "false" defined to be `\t \f. f` +> `true` defined to be `\t \f. t` +> `false` defined to be `\t \f. f` In Racket, these can be defined like this: @@ -26,7 +26,7 @@ In Racket, these can be defined like this: (define false (lambda (t) (lambda (f) f)))
    -
  1. Define a "neg" operator that negates "true" and "false". +
  2. Define a `neg` operator that negates `true` and `false`. Expected behavior: @@ -38,9 +38,9 @@ evaluates to 20, and evaluates to 10. -
  3. Define an "and" operator. +
  4. Define an `and` operator. -
  5. Define an "xor" operator. +
  6. Define an `xor` operator. (If you haven't seen this term before, here's a truth table: