From: Chris Date: Wed, 25 Feb 2015 18:32:17 +0000 (-0500) Subject: Merge branch 'working' X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=05482306cef7233556b8502ba02126c83c76dbc1;hp=b32335b5eb7ec1092798f3f77f4316b3709bfb8b Merge branch 'working' --- diff --git a/exercises/assignment4.mdwn b/exercises/assignment4.mdwn index fbda153a..3786a61b 100644 --- a/exercises/assignment4.mdwn +++ b/exercises/assignment4.mdwn @@ -109,7 +109,7 @@ For instance, `fact 0 ~~> 1`, `fact 1 ~~> 1`, `fact 2 ~~> 2`, `fact 3 ~~> Some limitations of this scheme: there is no easy way to label an inner, branching node (for example with a syntactic category like VP), and there is no way to represent a tree in which a mother node has a single daughter. - When processing a tree, you can test for whether the tree is a leaf node (that is, contains only a single number), by testing whether the length of the list is 1. This will be your base case for your recursive definitions that work on these trees. (You'll probably want to write a function `leaf?` that compartmentalizes this check.) + When processing a tree, you can test for whether the tree is a leaf node (that is, contains only a single number), by testing whether the length of the list is 1. This will be your base case for your recursive definitions that work on these trees. (You'll probably want to write a function `leaf?` that encapsulates this check.) Your assignment is to write a Lambda Calculus function that expects a tree, encoded in the way just described, as an argument, and returns the sum of its leaves as a result. So for all of the trees listed above, it should return `1 + 2 + 3`, namely `6`. You can use any Lambda Calculus implementation of lists you like. diff --git a/index.mdwn b/index.mdwn index f5dd9712..b352d58b 100644 --- a/index.mdwn +++ b/index.mdwn @@ -128,6 +128,8 @@ Towards types (in progress); > Now you can read Sections 3.1 and 6.1 of Hankin; and browse the rest of Hankin Chapter 6, which should look somewhat familiar. +> If you're reading along in the Pierce book, we've now covered much of the material in his Chapters 1-7. + > We posted [[answers to Week 3's homework|exercises/assignment3_answers]].