X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2Fweek3_church_arithmetic.mdwn;h=8907c12ac01bb3b2287280a4c2741e5c0e0c7459;hp=55f5ab22f3cd7fd01eeba628bccaa0ef70e782e3;hb=f41c2c72434b36288f17c652f010cb6e29e56f73;hpb=ccfda3680551144d8d34e0bb262a391d9e5c9d6e;ds=sidebyside diff --git a/topics/week3_church_arithmetic.mdwn b/topics/week3_church_arithmetic.mdwn index 55f5ab22..8907c12a 100644 --- a/topics/week3_church_arithmetic.mdwn +++ b/topics/week3_church_arithmetic.mdwn @@ -71,3 +71,5 @@ Interestingly, `mul l r` defined in that second way eta-reduces to `\f. r (l f)` If we continue in this direction, we end up defining `l^r` (where `2^5` is `32`) either as `r (mul l) one` or as the *application* `r l` of `r` to `l`. Not all of the arithmetic encodings are so neat and elegant, however. As we mentioned, `pred` takes some ingenuity. We'll also have you define `zero?` and for homework. + +Here is an example of [some programmers having fun with Church numbers](http://www.schemers.org/Miscellaneous/imagine.txt).