<div dir="ltr"><div>You were right on.</div><div><br></div><div>So I converted one of the mutable and it worked:</div><div>(make-immutable-hash (hash->list mutable-hash))</div><div><br></div><div>Is there a better way? </div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Aug 17, 2013 at 9:18 AM, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu" target="_blank">robby@eecs.northwestern.edu</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">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">
<div><div class="h5">
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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5">
<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><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></div></div>____________________<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>
</blockquote></div><br></div>