SICP Exercise 2.26

Exercise 2.26.  Suppose we define x and y to be two lists:


(define x (list 1 2 3))
(define y (list 4 5 6))


What result is printed by the interpreter in response to evaluating each of the following expressions:


(append x y)

(cons x y)

(list x y)



SOLUTION


The code and tests are here.

Comments

Popular posts from this blog

SICP Exercise 2.56 differentiation rule

SICP Exercise 1.28 (Miller-Rabin Test)

SICP Exercise 4.18 a alternative strategy for interpreting internal definitions