练习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))
时间: 2024-10-07 11:01:52