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)
将练习依次输入解释器
1 ]=> (define x (list 1 2 3))
;Value: x
1 ]=> (define y (list 4 5 6))
;Value: y
1 ]=> (append x y)
;Value 5: (1 2 3 4 5 6)
1 ]=> (cons x y)
;Value 6: ((1 2 3) 4 5 6)
1 ]=> (list x y)
;Value 7: ((1 2 3) (4 5 6))
1 ]=>