SICP solution exercise 2.26

Solution for exercise 2.26 of SICP:

;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)
;(1 2 3 4 5 6)

(cons x y)
;((1 2 3) 4 5 6)

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

This entry was posted in SICP and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>