[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Hash table equality pitfall
From: |
Alex Queiroz |
Subject: |
Re: [Chicken-users] Hash table equality pitfall |
Date: |
Fri, 2 Mar 2012 10:32:20 +0100 |
On Thu, Mar 1, 2012 at 7:01 PM, Peter Bex <address@hidden> wrote:
>
> If they do it "correctly", how do they deal with differences in initial
> bucket size, and what do they do with hash tables having identical
> key/values but different hashing or different comparison procedures?
>
If I were to write a `equal?` procedure for hash-tables, my test for
"correctness" would be:
(equal? hash-table1 hash-table2) iff (equal? (hash-table->alist
hash-table1) (hash-table->alist hash-table2))
provided that `hash-table->alist` does the obvious thing.
--
-alex
http://www.artisancoder.com/