Welcome to DrScheme, version 204. Language: Textual (MzScheme, includes R5RS). > (map (compose floor log2) '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)) (0 1.0 1.0 2.0 2.0 2.0 2.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 3.0 4.0 4.0 4.0 4.0 4.0) > (map (compose ceiling log2) '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)) (0 1.0 2.0 2.0 3.0 3.0 3.0 3.0 4.0 4.0 4.0 4.0 4.0 4.0 4.0 4.0 5.0 5.0 5.0 5.0) > (apply + (map (compose floor log2) '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20))) 54.0 > ((compose floor log2) 1023) 9.0 > (apply + (map (compose ceiling log2) '(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20))) 69.0 > (define compose (lambda (f g) ;; compose is a procedure (lambda (x) ;; (f (g x)) ;; whose arguments and value are procedures ))) (define log2 (lambda (n) (/ (log n) (log 2)))) Fill in the blanks: > (define mystery (lambda (+ -) (+ (- x y) (- y x)))) > (define x 10) > (define y 5) > (mystery * /) ????? http://www.cns.uni.edu/~wallingf/teaching/154/sessions/session06.html