X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment3.mdwn;h=c4ea316287a62ceb9de2af825b31d6a53877470f;hp=568a5c5310808d9a62cabd368721898cbda3c5aa;hb=e4ea387ecb1a2dcb069060afccbe8ac1e70f7061;hpb=63896de25bdcf571e788507695448675dc395ecc;ds=sidebyside diff --git a/assignment3.mdwn b/assignment3.mdwn index 568a5c53..c4ea3162 100644 --- a/assignment3.mdwn +++ b/assignment3.mdwn @@ -70,7 +70,7 @@ same length. That is, 5. In assignment 2, we discovered that version 3-type lists (the ones that work like Church numerals) made it much easier to define operations like `map` and `filter`. But now that we have recursion in our toolbox, -reasonable map and filter functions for version 3 lists are within our +reasonable map and filter functions for version 1 lists are within our reach. Give definitions for `map` and a `filter` for verson 1 type lists. #Computing with trees# @@ -89,7 +89,7 @@ Then we have the following representations: (a) (b) (c) . /|\ /\ /\ - / | \ /\ 3 1/\ + / | \ /\ 3 1 /\ 1 2 3 1 2 2 3 [[1];[2];[3]] [[[1];[2]];[3]] [[1];[[2];[3]]] @@ -130,5 +130,5 @@ count-leaves tb ~~> 6 count-leaves tc ~~> 6 -2. Write a function that counts the number of leaves.# +2. Write a function that counts the number of leaves.