X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment2.mdwn;h=ba4e1b4a39970232423c789101844385552171c8;hp=f6bde83dc1c5351567884ff3f7c61f8b3b23be64;hb=aa7deb666b6b959faf7a78a298d6c72cd55b0577;hpb=ffe08a8b7b983eb0919882f2a2e9c72aa27394ea diff --git a/assignment2.mdwn b/assignment2.mdwn index f6bde83d..ba4e1b4a 100644 --- a/assignment2.mdwn +++ b/assignment2.mdwn @@ -72,15 +72,15 @@ For these exercises, assume that `LIST` is the result of evaluating: (make-list a (make-list b (make-list c (make-list d (make-list e empty))))) -1. What would be the result of evaluating: +16. What would be the result of evaluating (see [[Assignment 2 hint 1]] for a hint): LIST make-list empty -2. Based on your answer to question 1, how might you implement the **map** function? Expected behavior: +17. Based on your answer to question 1, how might you implement the **map** function? Expected behavior:
map f LIST <~~> (make-list (f a) (make-list (f b) (make-list (f c) (make-list (f d) (make-list (f e) empty)))))
-3. Based on your answer to question 1, how might you implement the **filter** function? The expected behavior is that: +18. Based on your answer to question 1, how might you implement the **filter** function? The expected behavior is that: filter f LIST