[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Resizing hash tables in Guile

From: Paul Jarc
Subject: Re: Resizing hash tables in Guile
Date: Thu, 13 Feb 2003 15:02:38 -0500
User-agent: Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 (i686-pc-linux-gnu)

address@hidden (Harvey J. Stein) wrote:
> Joris van der Hoeven <address@hidden> writes:
>> inserting requires looking up too.
> Yes, if you want to return an error for inserting 2 items with the
> same key.

Or if you want to replace existing entries, as Guile's current hash
tables do.

>> But you need a compairison operation for that,
>> which may be even less natural than a hash function.
> Yes.  For hash tables you just need a key equality test.  For trees
> you need to be able to order the keys.

It's easy enough to support this: (< (hash key1 0) (hash key2 0))
But this is probably only useful in the general case.  It should be
possible to substitute a less expensive ordering function when one is


reply via email to

[Prev in Thread] Current Thread [Next in Thread]