X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=week1.mdwn;h=f2d4aebb677d376b02617fe4a55535f767c12714;hp=53d69ddaaf074c02a61f6ae949257e7452a21b99;hb=8f243902e5437b1d6467a856c3fb935771cc70ce;hpb=d16b4f077f3da9a2c79e2092fdc7e5ea1a2812c0 diff --git a/week1.mdwn b/week1.mdwn index 53d69dda..f2d4aebb 100644 --- a/week1.mdwn +++ b/week1.mdwn @@ -558,12 +558,15 @@ It may be helpful to contrast these recursive-style definitons to the way one wo `let`   `empty? match` λ `xs.` *this definition left as an exercise*; -  `tail match` λ `xs.` *this definition left as an exercise* +  `tail match` λ `xs.` *this definition left as an exercise*;   `length match` λ `xs. let` -       `n := 0;` -       `while not (empty? xs) do` -         `n := n + 1;` -         `xs := tail xs` -       `end` -     `in n` +                                         `n := 0;` +                                         `while not (empty? xs) do` +                                           `n := n + 1;` +                                           `xs := tail xs` +                                         `end` +                                      `in n` +`in length` + +Here ...