Those are equal if they are both mutable or both immutable. Probably one is mutable and the other isn't (this, unfortunately, doesn't show up in the print outs). It is quite confusing, I agree.
> (equal? #hash((6 . 1) (4 . 1) (3 . 2) (2 . 2)) #hash((2 . 2) (3 . 2) (4 . 1) (6 . 1))) #t Robby On Sat, Aug 17, 2013 at 8:13 AM, J G Cho <g...@fundingmatters.com> wrote: > FAILURE > actual: #hash((6 . 1) (4 . 1) (3 . 2) (2 . 2)) > expected: #hash((2 . 2) (3 . 2) (4 . 1) (6 . 1)) > name: check-equal? > > I tried alternative like > (check-true (hash-equal? hash1 hash2)) > > but it turns out hash-equal? is not what I expected it to be. > > Other than writing a custom comparison, is there a handy way to compare 2 > #hash? > > jGc > > ____________________ > Racket Users list: > http://lists.racket-lang.org/users > >
____________________ Racket Users list: http://lists.racket-lang.org/users