;;3.10 Destructive functions ;Adam Nelson ;Chet Tobrey (egs :3.10 (eg '(setf x '(a b c)) :of "assigning ( a b c ) to x" :out '(A B C)) (eg '(setf y '(1 2 3)) :of "assigning ( 1 2 3 ) to y" :out '(1 2 3)) (eg '(append x y) :of "append is a pure function so x and y retain their values" :out '(A B C 1 2 3)) (eg '(print x) :of " x retaining is original value" :out '(A B C)) (eg '(print y) :of "y retains its original value" :out '(1 2 3)) (eg '(nconc x y) :of "using nconc , a destructive function to combine the lists" :out '(A B C 1 2 3)) (eg '(print x) :of "nconc has the side effect of altering its first argument" :out '(A B C 1 2 3)) (eg '(print y) :of "y retains its initial value" :out '(1 2 3)))