X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=exercises%2F_assignment4.mdwn;h=7df06052a7d951fd663438b1b9cfbc5181238bed;hp=212a6d0511f35e444a9cc76e39d314d069c9f8a5;hb=abc0baa2ed12fe5c63518c42541591c878b65660;hpb=97f833698c03ea88d4a3acdbb5d9ab8ec60ef69c diff --git a/exercises/_assignment4.mdwn b/exercises/_assignment4.mdwn index 212a6d05..7df06052 100644 --- a/exercises/_assignment4.mdwn +++ b/exercises/_assignment4.mdwn @@ -29,18 +29,18 @@ The factorial `n! = n * (n - 1) * (n - 2) * ... * 3 * 2 * 1`. For instance, `fac 0 ~~> 1`, `fac 1 ~~> 1`, `fac 2 ~~> 2`, `fac 3 ~~> 6`, and `fac 4 ~~> 24`. - let true = \then else. then in - let false = \then else. else in - let iszero = \n. n (\x. false) true in - let pred = \n f z. n (\u v. v (u f)) (K z) I in - let succ = \n f z. f (n f z) in - let add = \n m .n succ m in - let mult = \n m.n(add m)0 in - let Y = \h . (\f . h (f f)) (\f . h (f f)) in - - let fac = ... in - - fac 4 + let true = \then else. then in + let false = \then else. else in + let iszero = \n. n (\x. false) true in + let pred = \n f z. n (\u v. v (u f)) (K z) I in + let succ = \n f z. f (n f z) in + let add = \n m .n succ m in + let mult = \n m.n(add m)0 in + let Y = \h . (\f . h (f f)) (\f . h (f f)) in + + let fac = ... in + + fac 4 ## Arithmetic infinity? ##