X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=topics%2Fweek3_lists.mdwn;h=08b35162f470f8e61293534faa7c2633bbb1848b;hp=6f7c1e0fa6e1e5c6ae4a3b8a69b9078ef545e705;hb=78be35a1a13e17219773f38a219144ef7172c745;hpb=8b4fc32ec904cba61e9fd304c971f9e5dc465d88 diff --git a/topics/week3_lists.mdwn b/topics/week3_lists.mdwn index 6f7c1e0f..08b35162 100644 --- a/topics/week3_lists.mdwn +++ b/topics/week3_lists.mdwn @@ -1,5 +1,6 @@ # More on Lists # + ## Comprehensions ## We know you are already familiar with the following kind of notation for designating sets: @@ -119,6 +120,8 @@ not to: To get the latter, you'd need to apply `join` twice. + + ## Tails ## For the Lambda Calculus, we've proposed to encode lists in terms of higher-order functions that perform right-folds on (what we intuitively regard as) the real list. Thus, the list we'd write in Kapulet or Haskell as: @@ -151,3 +154,5 @@ Try it out in the lambda evaluator. After the code above, you can write: and the result will be `\f z. f b (f c z)`, our encoding of `[b, c]`. + +