Re: Confused by behavior of LispWorks for code snippet
- From: Klaus Harbo <klaus@xxxxxxxxx>
- Date: Sun, 30 Sep 2007 10:07:18 +0200
Damien Kick wrote:
With LispWorks Personal Edition 5.0.1 (PowerPC), I see the following behavior:
<code>
CL-USER 1 > (defparameter *x* #'(lambda () 13))
*X*
CL-USER 2 > *x*
#<anonymous interpreted function 200EB012>
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
CL-USER 6 > (eql #'f #'g)
NIL
CL-USER 7 > (eql #'f *x*)
NIL
CL-USER 8 > (eq *x* *x*)
T
</code>
I would've expected (EQ #'F #'G) => T. I am getting that result, i.e. (EQ #'F #'G) => T, with both Allegro CL 8.0 and Clisp. Is LispWorks mistaken or is that an allowable result?
FWIW, on LWM 5.0.2 (Intel) I get
CL-USER 121 > (defparameter *x* (lambda () 27))
*X*
CL-USER 122 > (setf (symbol-function 'f) *x*)
#.#'(LAMBDA () 27)
CL-USER 123 > (setf (symbol-function 'g) *x*)
#.#'(LAMBDA () 27)
CL-USER 124 > (eql #'f #'g)
T
CL-USER 125 >
-Klaus.
.
- References:
- Confused by behavior of LispWorks for code snippet
- From: Damien Kick
- Confused by behavior of LispWorks for code snippet
- Prev by Date: Re: Confused by behavior of LispWorks for code snippet
- Next by Date: Re: Flamebait if I ever saw it
- Previous by thread: Re: Confused by behavior of LispWorks for code snippet
- Next by thread: Re: Confused by behavior of LispWorks for code snippet
- Index(es):