[racket] bug? bit-vector equal problem

From: Greg Hendershott (greghendershott at gmail.com)
Date: Tue Aug 19 23:11:12 EDT 2014

I submitted a PR with a suggested fix:

https://github.com/plt/racket/pull/756

> Looking at bit-vector.rkt, it seems the problem might be the "TODO"
> comment here:
>
> (serializable-struct bit-vector (words size)
>   ....
>   #:methods gen:equal+hash
>   [(define (equal-proc x y recursive-equal?)
>      (let ([vx (bit-vector-words x)]
>            [vy (bit-vector-words y)]
>            [nx (bit-vector-size x)]
>            [ny (bit-vector-size y)])
>        (and (= nx ny)
>             (for/and ([index (in-range (- (bytes-length vx) 1))])
>               (eq? (bytes-ref vx index)
>                    (bytes-ref vy index)))
>             ; TODO: check last word
>             )))
>   ....

Posted on the users mailing list.