Bug fix: Equal handles numbers correctly now.

This commit is contained in:
Abdulaziz Ghuloum 2006-11-30 18:28:44 -05:00
parent 5cc06893ec
commit c3401ef735
3 changed files with 2 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -851,7 +851,7 @@
(f x v n ($fxadd1 i)))))
(error 'vector-memq "~s is not a vector" v))))
(primitive-set! 'memv memq)
(primitive-set! 'memv memq) ; INCORRECT, SHOULD USE EQV
(primitive-set! 'vector-memv vector-memq)
(primitive-set! 'list->string
@ -1198,6 +1198,7 @@
(let ([n ($string-length x)])
(and ($fx= n ($string-length y))
(string-loop x y 0 n))))]
[(number? x) (and (number? y) (= x y))]
[else #f])))
(primitive-set! 'equal? equal?))