Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 403 Bytes

2.26.md

File metadata and controls

30 lines (19 loc) · 403 Bytes

2.26

Question

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)

Answer

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

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

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