I have some global variables of type integer created with defparameter. I use these as keys in CASE clauses to match at test-key that was, at some point in my program, set to one of these global variables.
So far as I know, the CASE macro uses EQL (http://clhs.lisp.se/Body/26_glo_s.htm#same), but I don't get a match: all is dumped into the otherwise clause. Code below summarises what's puzzling me.
- (defparameter snafu 123) => SNAFU
- (let ((x snafu)) (and (eq x snafu) (eql x snafu) (equal x snafu))) => T
- (let ((x snafu)) (case x (snafu 'yes) (t 'no))) => NO
- (let ((x snafu)) (cond ((eql x snafu) 'yes) (t 'no))) => YES
I don't understand why I don't get YES in the CASE.