mit-scheme-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MIT-Scheme-devel] eqv? and eqv-hash disagree on empty vectors


From: Taylor R Campbell
Subject: [MIT-Scheme-devel] eqv? and eqv-hash disagree on empty vectors
Date: Sat, 5 Nov 2016 00:35:09 +0000

(let ((u (vector))
      (v (vector)))
  (list (list 'eq (eq? u v) (eq-hash u) (eq-hash v) 
              (= (eq-hash u) (eq-hash v)))
        (list 'eqv (eqv? u v) (eqv-hash u) (eqv-hash v)
              (= (eqv-hash u) (eqv-hash v)))))
;Value 15: ((eq #f 107689176 107689168 #f) (eqv #t 107689176 107689168 #f))

Oops.

Why do we treat empty vectors as eqv?  If we do, eqv-hash needs to be
made to agree.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]