eq and hashing (was Re: [plt-scheme] How to make unit functors?)

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Thu May 29 09:21:08 EDT 2003

Jacob Matthews wrote:

>Here's a real-world situation that's affected by this property: a while
>back, Mike Machenry and I implemented a functional-sets library a using a
>binary search tree as the underlying set representation. Of course we had
>to have keys that would all be comparable with each other for this
>representation to work out, but it didn't particularly matter what the
>keys were, so we just used each item's hash value as its binary-tree key.
>Now it sounds as though symbols inserted into these sets will get lost in
>programs that rely on the property that 'a = 'a, so our sets have a bug.
>  
>

But if the symbols are kept in the data structure, then there shouldn't 
be a problem?

-- 
Jens Axel Søgaard






Posted on the users mailing list.