[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: S&I's idea of EQ? (OOPS!)
Yes, I see what you mean. Here is my real answer to the EQ-Quiz.
Sorry for the slip up... I went back to edit lower case t's and
f's (because lower case i didn't look right) into upper case T's
and F's and apparently screwed up.
F (eq? (lambda (x) x) (lambda (y) y))
F (eqv? (lambda (x) x) (lambda (y) y))
T (let ((x (lambda (z) z))) (eq? x x))
T (let ((x (lambda (z) z))) (eqv? x x))
T (let ((x ... any expression evaluating to an exact number ...))
(eq? x x))
I (eq? #\x #\x)
There is one important one to add, by the way:
F (let ([f (lambda () (lambda (y) y))]) (eq? (f) (f)))
Which right now returns true in Chez Scheme. Sigh...
Kent