Please provide me some cases that for the same argument, eq? and eqv?
evaluates differently.
thank you.
(define a (list 1 2))
(define b (list 1 2))
(eq? a b)
(eqv? a b)
(eq? a a)
It's like this. If you were on the beach and you saw a
Great White Shark X in the water, and a hour later someone
else saw a Great White Shark Y in the water, and then
two hours later someone killed a Great White Shark Z
in the water, you would very much like to know if
(and (eq? X Y) (eq? Y Z)) ; there was only one shark seen, and it is dead.
versus
(and (eqv? X Y) (eqv? Y Z)) ; there may be one, two, or three sharks, all Great White Sharks.
; one of them is dead.
You mostly use eqv? and equal? in this course.
You can use eq? if you are comparing symbolic atoms, or if you really
care to make a case that THIS '(a b c) and THAT '(a b c) are different
even though their corresponding subparts are eq. or that
if (define whale '(a b c)) .. (eq? whale whale) but not (eq? whale (cons 'a '(b c)))
RJF
Unless you're in the witness protection program please use your real name
when posting to this newsgroup.