[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] hash-table with missing keys
From: |
Michele Simionato |
Subject: |
Re: [Chicken-users] hash-table with missing keys |
Date: |
Thu, 19 May 2005 04:37:23 -0400 |
On 5/19/05, felix winkelmann <address@hidden> wrote:
> the reason why one should use (for example):
>
> (hash-table-ref h 'non-existing-key
>
> <some-unique-value-known-to-the-application-that-created-and-uses-the-hashtable>)
>
> to disambiguate the result:
>
> (let ((unique (list 1)))
> (if (eq? unique (hash-table-ref ht 'non-existing-key unique))
> ...not found...
> ...found...))
Yes, this is what I am doing now, but it is ugly, too low-level for my taste.
Felix, I give you an ultimatum: or you raise an exception,
or you give me a hash-table-has-key? function! ;-)
Michele