[alexandria-devel] HASH-TABLE-NEXT worthwhile to have?

Nikodemus Siivola nikodemus at random-state.net
Tue Jul 10 08:48:20 UTC 2007


Andreas Fuchs wrote:
> Nikodemus Siivola wrote:
>> Samium Gromoff wrote:
>>> Would it be worthwhile to have something like this:
>>>
>>> (defun hash-table-next (hash-table)
>>>   "Returns the first EXIST-P, KEY, VALUE triple in the HASH-TABLE it can
>>>    get its hands on; otherwise, NIL."
>>>   (with-hash-table-iterator (fn hash-table)
>>>     (fn)))
>> What's the use-case?
> 
> I use something like this, named hash-table-contains-elements-p.

  (defun hash-table-empty-p (hash-table)
    (zerop (hash-table-count hash-table)))

?

Cheers,

  -- Nikodemus



More information about the alexandria-devel mailing list