Subject: Re: Confused by behavior of LispWorks for code snippet
From: rpw3@rpw3.org (Rob Warnock)
Date: Sun, 30 Sep 2007 03:01:56 -0500
Newsgroups: comp.lang.lisp
Message-ID: <DpidnT1j35JpymLbnZ2dnUVZ_gmdnZ2d@speakeasy.net>
Damien Kick  <dkixk@earthlink.net> wrote:
+---------------
| With LispWorks Personal Edition 5.0.1 (PowerPC),
| I see the following behavior:
...
| CL-USER 3 > (setf (symbol-function 'f) *x*)
| #<anonymous interpreted function 200EB012>
| 
| CL-USER 4 > (setf (symbol-function 'g) *x*)
| #<anonymous interpreted function 200EB012>
| 
| CL-USER 5 > (eq #'f #'g)
| NIL
+---------------

I don't use LispWorks, so this may be a totally wild hair,
but try (SETF (FDEFINITION 'F) *X*) and see what happens.
SYMBOL-FUNCTION & FDEFINITION are *supposed* to be the same
when applied to symbols, but LispWorks might be treating
them differently...


-Rob

p.s. Oh, and in CMUCL all five of *X*, (SYMBOL-FUNCTION 'F),
(SYMBOL-FUNCTION 'G), (FDEFINITION 'F), & (FDEFINITION 'G) are EQ.


-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607