- Draw a picture of how Common Lisp would represent
'(1 (2 3) ((4 5) 6)).
- Draw a picture of how Common Lisp would represent
'(defun add-one ( n ) (+ n 1)).
- Describe one advantage of Lisp representing data and
code in the same manner.
- Draw a picture showing the effects of the following.
(setf list1 '(2 3))
(setf list2 (cons 1 list1))
- Draw a picture showing the effects of the following.
(setf list1 '(1 2))
(setf list2 '(3))
(setf list3 (append list1 list2))
- Explain why it is preferable to use cons
over append.
- Why is it dangerous to do the following:
(setf alist '(1 2 3))
(setf (second alist) 4)
- Why is eq more efficient than equal?