Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uwm.edu!uakari.primate.wisc.edu!xanth!mcnc!rti!ntcsd1!mps From: mps@ntcsd1.UUCP (Michael P. Smith) Newsgroups: comp.lang.lisp Subject: NCONC & Functions Message-ID: <464@ntcsd1.UUCP> Date: 28 Nov 89 22:19:26 GMT Reply-To: mps@ntcsd1.UUCP (Michael Smith) Distribution: na Organization: Northern Telecom, Research Triangle Park, North Carolina Lines: 28 On both a TI and a Sun (using Sun Common Lisp (lucid)), the following occurs: >(DEFUN foo1 () '(a b c)) >FOO1 >(foo1) >(A B C) >(NCONC (foo1) '(d e f)) >(A B C D E F) >(foo1) >(A B C D E F) (DEFUN foo2 () (LIST 'a 'b 'c)) is unaffected in the same situation. I think I understand what is happening. NCONC is treating the pointer re- turned by evaluating (FOO1) just as if it were evaluating a variable FOO1. But I don't like it. There is no variable FOO1, and NCONC is in effect re- defining the function FOO1. I have been using the rule: don't use destructive operations on data struc- tures you care about. Now this turns out to be insufficient. Is there a rule regarding when destructive operations can affect the values returned by functions they are not part of? I'm told that even FOO2 is affected when running Franz on a DEC station. Thanks. Mike Smith ( mps@ntcsd1 | mcnc!ntcsd1!mps )