Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!samsung!crackers!m2c!risky.ecs.umass.edu!dime!smectos!HEP From: HEP@smectos.gang.umass.edu (High Energy Physics Group) Newsgroups: comp.lang.lisp Subject: Re: Destructive Operations Message-ID: <29982@dime.cs.umass.edu> Date: 2 May 91 06:36:07 GMT References: <1351@ai.cs.utexas.edu> <1991Apr25.052624.14541@Think.COM> Sender: root@dime.cs.umass.edu Reply-To: HEP@smectos.CS.UMASS.EDU (High Energy Physics Group) Organization: University of Massachusetts, Amherst Lines: 27 I have managed to get myself into trouble many times by using destructive operators. The following example is probably my favorite: (setf *ht* (make-hash-table :test #'equal)) # (setf *x* '(3)) (3) (setf (gethash *x* *ht*) :hi-there) :hi-there (gethash '(3) *ht*) :hi-there t (setf (first *x*) 92) 92 (gethash '(3) *ht*) nil nil Sure, it's obvious in retrospect, but not at the time when I did this! --kleanthes