X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=blobdiff_plain;f=assignment2.mdwn;h=bcfba912fc6dfd28a4a37df1590370a9b764f4b6;hp=b8a2444caef15b094dd5b67c9d6881e26030f60f;hb=c7978bc281c36093f85f5c478f2844fc124919a5;hpb=1123b395aebb6b5392b3582bd0e310a8a4e32ff5 diff --git a/assignment2.mdwn b/assignment2.mdwn index b8a2444c..bcfba912 100644 --- a/assignment2.mdwn +++ b/assignment2.mdwn @@ -72,17 +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 [[Assignment 2 hint 1]]: LIST make-list empty -[[Assignment 2 hint 1]] - -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