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#
(a) (b) (c)
.
/|\ /\ /\
- / | \ /\ 3 1/\
+ / | \ /\ 3 1 /\
1 2 3 1 2 2 3
[[1];[2];[3]] [[[1];[2]];[3]] [[1];[[2];[3]]]