cs61a_sp08_mt1_01 - (a b c)) (map (lambda (x) (let ((x (+ x...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Question 1 (5 points): What will Scheme print in response to the following expressions? If an expression produces an error message, you may just write “error”; you don’t have to provide the exact text of the message. If the value of an expression is a procedure, just write “procedure”; you don’t have to show the form in which Scheme prints procedures. (every (lambda (x) (/ x 2)) (keep even? (every (lambda (x) (* x x)) (2 3 4 5)))) (map (lambda (x) (se x x)) (a b c)) (every (lambda (x) (se x x))
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (a b c)) (map (lambda (x) (let ((x (+ x 1)) (y x)) (* x y))) (2 5)) (cddadr ((a b c d e) (f g h I j) (k l m n o)) Question 2 (4 points): What will scheme print in response to the following expressions? If an expression produces an error message, you may just write error; you dont have to provide the exact text of the message. Also, draw a box and pointer diagram for the value produced by each expression. (list (list 2 (cons 3 5))) (append (5 6 (cons 1 (2 3)))...
View Full Document

This note was uploaded on 08/26/2009 for the course CS 61A taught by Professor Harvey during the Spring '08 term at University of California, Berkeley.

Ask a homework question - tutors are online