【SICP练习】56 练习2.24-2.26
练习2.24
其打印结果为:(1 (2 (3 4)))
练习2.25
(define x ‘(1 3 (5 7) 9))
(cadr (caddr x))
;Value: 7
(define y ‘((7)))
(caar y)
;Value: 7
(define z ‘(1 (2 (3 (4 (5 (6 7)))))))
(cadr (cadr (cadr (cadr (cadr (cadrz))))))
;Value: 7
练习2.26
(define x (list 1 2 3))
(define y (list 4 5 6))
(append x y)
;Value: (1 2 3 4 5 6)
(cons x y)
;Value: ((1 2 3) 4 5 6)
(list x y)
;Value: ((1 2 3) (4 5 6))
版权声明:本文为 NoMasp柯于旺 原创文章,如需转载请联系本人。