<div dir="ltr">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.<div><br>
</div><div><div>> (equal? #hash((6 . 1) (4 . 1) (3 . 2) (2 . 2)) #hash((2 . 2) (3 . 2) (4 . 1) (6 . 1)))</div><div>#t</div></div><div><br></div><div>Robby</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Sat, Aug 17, 2013 at 8:13 AM, J G Cho <span dir="ltr"><<a href="mailto:gcho@fundingmatters.com" target="_blank">gcho@fundingmatters.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div style="font-size:13px;font-family:arial,sans-serif">FAILURE</div><div style="font-size:13px;font-family:arial,sans-serif">actual: #hash((6 . 1) (4 . 1) (3 . 2) (2 . 2))</div>
<div style="font-size:13px;font-family:arial,sans-serif">expected: #hash((2 . 2) (3 . 2) (4 . 1) (6 . 1))</div><div style="font-size:13px;font-family:arial,sans-serif">name: check-equal?</div>
<div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">I tried alternative like</div><div style="font-size:13px;font-family:arial,sans-serif">
(check-true (hash-equal? hash1 hash2))</div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif"> but it turns out hash-equal? is not what I expected it to be.</div>
<div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">Other than writing a custom comparison, is there a handy way to compare 2 #hash?</div><span class="HOEnZb"><font color="#888888">
<div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">jGc</div></font></span></div>
<br>____________________<br>
Racket Users list:<br>
<a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>