Exercise 2.53. What would the interpreter print in response to evaluating each of the following expressions?
(list 'a 'b 'c)
(list (list 'george))
(cdr '((x1 x2) (y1 y2)))
(cadr '((x1 x2) (y1 y2)))
(pair? (car '(a short list)))
(memq 'red '((red shoes) (blue socks)))
(memq 'red '(red shoes blue socks))
1 ]=> (list 'a 'b 'c)
;Value 2: (a b c)
1 ]=> (list (list 'george))
;Value 3: ((george))
1 ]=> (cdr '((x1 x2) (y1 y2)))
;Value 4: ((y1 y2))
1 ]=> (cadr '((x1 x2) (y1 y2)))
;Value 5: (y1 y2)
1 ]=> (pair? (car '(a short list)))
;Value: #f
1 ]=> (memq 'red '((red shoes) (blue socks)))
;Value: #f
1 ]=> (memq 'red '(red shoes blue socks))
;Value 6: (red shoes blue socks)
注意:memq 只能对只包含原子的表进行判断。