CL not is not not?
Jamison Hope
jrh@theptrgroup.com
Tue Apr 24 08:04:00 GMT 2012
Speaking of Common Lisp, I find this interaction to be very curious...
$ kawa --lisp
#|kawa:1|# (not t)
t
#|kawa:2|# (not ())
t
#|kawa:3|# (not #'not)
()
#|kawa:4|# (not #'cons)
()
#|kawa:5|# (not #'defun)
()
#|kawa:6|# (not #!null)
t
#|kawa:7|# (not #!eof)
t
#|kawa:8|# (defun mynot (x) (not x))
#|kawa:9|# (mynot t)
()
(mynot ())
t
#|kawa:11|# (mynot #'not)
()
#|kawa:12|# (mynot #'cons)
()
#|kawa:13|# (mynot #'defun)
()
#|kawa:14|# (mynot #!null)
()
#|kawa:15|# (mynot #!eof)
()
#|kawa:16|# ^D
mynot always gave the correct answer, but directly calling #'not
gave me the wrong answer for inputs t, #!null, and #!eof (and
I'm sure that if I had tried other inputs I could've found more).
I would investigate, but I should be asleep right now.
This is with a fresh up-to-date checkout of r7212.
--
Jamison Hope
The PTR Group
www.theptrgroup.com
More information about the Kawa
mailing list