[alexandria-devel] HASH-TABLE-NEXT worthwhile to have?
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))) ? regards, Samium Gromoff P.S. The original idea belongs to Tobias Rittweiler.
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? Cheers, -- Nikodemus
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. Cheers, -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs
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
Nikodemus Siivola wrote:
Andreas Fuchs wrote:
Nikodemus Siivola wrote:
Samium Gromoff wrote:
Would it be worthwhile to have something like this:
(defun hash-table-next (hash-table) 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)))
?
Oh, heh. Ooops. Yeah, that will do, too. Thanks, -- Andreas Fuchs, (http://|im:asf@|mailto:asf@)boinkor.net, antifuchs
At Tue, 10 Jul 2007 11:02:30 +0300, 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?
Picking apart the hash table without: 1. having to know anything about the elements 2. having to do it in a iterative fashion i.e. "give me an element from that bag".
Cheers,
-- Nikodemus
participants (3)
-
Andreas Fuchs
-
Nikodemus Siivola
-
Samium Gromoff