[Top][All Lists]

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

[Chicken-users] missing hash table functions

From: Michele Simionato
Subject: [Chicken-users] missing hash table functions
Date: Mon, 6 Jun 2005 10:00:48 -0400

I see that srfi-69 has various procedure for hash-tables which are
good candidates
for addition in Chicken. Especially I would welcome an hash-table-keys function.
For the moment I am emulating it in this way:

(define (hash-table-map proc h)
  (define ls '())
  (hash-table-for-each (lambda (k v) (push! (proc k v) ls)) h)
  (reverse ls))

(define (hash-table-keys h)
  (hash-table-map (project 0) h)) 

(hash-table-map is not in srfi-69, but it is useful enough). So, let me add 
these two functions to my feature request list ;)

                 Michele Simionato

reply via email to

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