Next: srfi hash-tables spec hashing, Previous: srfi hash-tables spec single, Up: srfi hash-tables spec [Index]
Return an exact integer representing the number of associations in hash-table. This operation must have a complexity of O(1) with respect to the number of associations in hash-table.
Return a list of keys in hash-table. The order of the keys is unspecified.
Return a list of values in hash-table. The order of the values is
unspecified, and is not guaranteed to match the order of keys in the
result of hash-table-keys
.
proc should be a function taking two arguments, a key and a value. This procedure calls proc for each association in hash-table, giving the key of the association as key and the value of the association as value. The results of proc are discarded. The order in which proc is called for the different associations is unspecified.
NOTE In some implementations, there is a procedure called
hash-table-map
which does the same as this procedure. However, in other implementations,hash-table-map
does something else. In no implementation that I know of,hash-table-map
does a real functorial map that lifts an ordinary function to the domain of hash tables. Because of these reasons,hash-table-map
is left outside this SRFI.
Call f for every association in hash-table with three arguments:
val is init-value for the first invocation of f, and,
for subsequent invocations of f, the return value of the previous
invocation of f. The value final-value returned by
hash-table-fold
is the return value of the last invocation of
f. The order in which f is called for different
associations is unspecified.
Return an association list such that the car of each element in alist is a key in hash-table and the corresponding cdr of each element in alist is the value associated to the key in hash-table. The order of the elements is unspecified.
The following should always produce a hash table with the same mappings as a hash table H:
(alist->hash-table (hash-table->alist h) (hash-table-equivalence-function h) (hash-table-hash-function h))
Return a new hash table with the same equivalence predicate, hash function and mappings as in hash-table.
Add all mappings in hash-table2 into hash-table1 and return the resulting hash table. This function may modify hash-table1 destructively.
Next: srfi hash-tables spec hashing, Previous: srfi hash-tables spec single, Up: srfi hash-tables spec [Index]