X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?a=blobdiff_plain;f=using_the_programming_languages.mdwn;h=d5eb31bd2cd4925c97731e610d805b4359868316;hb=26f6bb00d57f1cbfb02f8d774ca2affe292c8597;hp=dabcf14e2b9e9934c6514b9ce8cd911bd57482a0;hpb=cd24e6b0f3faf45ef683d6f112e8dc717a0345f9;p=lambda.git diff --git a/using_the_programming_languages.mdwn b/using_the_programming_languages.mdwn index dabcf14e..d5eb31bd 100644 --- a/using_the_programming_languages.mdwn +++ b/using_the_programming_languages.mdwn @@ -43,16 +43,16 @@ know much OCaml yet to use it. Using it looks like this: let add = << fun m n -> n $succ$ m >>;; (* or *) let add = << fun m n -> fun s z -> m s (n s z) >>;; - + (* now use: pp FORMULA to print a formula, unreduced pn FORMULA to print the normal form of a formula (when possible) pi FORMULA to print the integer which FORMULA is a Church numeral for (when possible) - + alpha_eq FORM1 FORM2 are FORM1 and FORM2 syntactically equivalent (up to alpha-conversion)? this does not do reductions on the formulae *) - + pi << $add$ $one$ $two$ >>;; - : int = 3