An implementation of a hash table written in portable Scheme
scheme-hashtable is free software licensed under the GNU General Public License version 3 or later.
scheme-hashtable should run in any R4RS+ conformant Scheme.
scheme-hashtable is known to work on:
(define foo (hash-tableq 'foo "foo" 'bar "bar"))
(hash-table-ref foo 'foo) ;; ===> (foo . "foo")
(hash-table-ref foo 'bar) ;; ===> (bar . "bar")
(hash-table-set! foo 'bar "baz")
(hash-table-ref foo 'bar) ;; ===> (bar . "baz")
Create and return a new hash table using equal?
, eq?
or eqv?
respectively for comparison of keys.
All hash tables are mutable.
Optionally takes a size as an argument.
Return #t if obj is a hash table.
Return #t if obj is a hash table using equal?
, eq?
or eqv?
respectively for comparison of keys.
Set key in the hash table ht to val.
Lookup the value of key in the hash table ht. If ht has key, return the pair of key and the value, else return #f.
Remove key from the hash table ht.
Convert the associative list alist to a hash table using equal?
, eq?
or eqv?
respectively for comparison of keys.
Convert the hash table ht to an associative list.
Construct a hash table using equal?
, eq?
or eqv?
respectively for comparison of keys.
Get assoc
, assq
or assv
depending on which procedure the hash table ht uses.
Get the predicate the hash table ht uses for comparison of keys.
Create a copy of the hash table ht.
Create a copy of the hash table ht and set the keys to the values.
Create a copy of the hash table ht and delete the keys.