CHICKEN implements SRFI 69 with SRFI 90 extensions. For more information, see SRFI-69 and SRFI-90.
[procedure] (make-hash-table [TEST HASH SIZE] #:TEST #:HASH #:SIZE #:INITIAL #:MIN-LOAD #:MAX-LOAD #:WEAK-KEYS #:WEAK-VALUES)
Returns a new HASH-TABLE with the supplied configuration.
(No, the keyword parameters are not uppercase.)
[procedure] (hash-table? OBJECT)
Is the OBJECT a hash-table?
[procedure] (hash-table-size HASH-TABLE)
The HASH-TABLE size.
[procedure] (hash-table-equivalence-function HASH-TABLE)
The HASH-TABLE equivalence-function.
[procedure] (hash-table-hash-function HASH-TABLE)
The HASH-TABLE hash-function.
[procedure] (hash-table-min-load HASH-TABLE)
The HASH-TABLE minimum load factor.
[procedure] (hash-table-max-load HASH-TABLE)
The HASH-TABLE maximum load factor.
[procedure] (hash-table-weak-keys HASH-TABLE)
Does the HASH-TABLE weak references for keys?
[procedure] (hash-table-weak-values HASH-TABLE)
Does the HASH-TABLE weak references for values?
[procedure] (hash-table-has-initial? HASH-TABLE)
Does the HASH-TABLE have a default initial value?
[procedure] (hash-table-initial HASH-TABLE)
The HASH-TABLE default initial value.
[procedure] (hash-table-keys HASH-TABLE)
Returns a list of the keys in the HASH-TABLE population.
[procedure] (hash-table-values HASH-TABLE)
Returns a list of the values in the HASH-TABLE population.
[procedure] (hash-table->alist HASH-TABLE)
Returns the population of the HASH-TABLE as an association-list.
[procedure] (alist->hash-table ASSOCIATION-LIST [MAKE-HASH-TABLE-PARAMETER ...])
Returns a new HASH-TABLE, configured using the optional MAKE-HASH-TABLE-PARAMETER .... The HASH-TABLE is populated from the ASSOCIATION-LIST.
[procedure] (hash-table-ref HASH-TABLE KEY)
Returns the VALUE for the KEY in the HASH-TABLE.
Aborts with an exception when the KEY is missing.
[procedure] (hash-table-ref/default HASH-TABLE KEY DEFAULT)
Returns the VALUE for the KEY in the HASH-TABLE, or the DEFAULT when the KEY is missing.
[procedure] (hash-table-exists? HASH-TABLE KEY)
Does the KEY exist in the HASH-TABLE?
[procedure] (hash-table-set! HASH-TABLE KEY VALUE)
Set the VALUE for the KEY in the HASH-TABLE.
A setter for hash-table-ref is defined, so
(set! (hash-table-ref HASH-TABLE KEY) VALUE)
is equivalent to
(hash-table-set! HASH-TABLE KEY VALUE)
[procedure] (hash-table-update! HASH-TABLE KEY [UPDATE-FUNCTION [DEFAULT-VALUE-FUNCTION]])
Sets or replaces the VALUE for KEY in the HASH-TABLE.
The UPDATE-FUNCTION takes the existing VALUE for KEY and returns the new VALUE. The default is identity
The DEFAULT-VALUE-FUNCTION is called when the entry for KEY is missing. The default uses the (hash-table-initial-value), if provided. Otherwise aborts with an exception.
Returns the new VALUE.
[procedure] (hash-table-update! HASH-TABLE KEY UPDATE-FUNCTION DEFAULT-VALUE)
Sets or replaces the VALUE for KEY in the HASH-TABLE.
The UPDATE-FUNCTION takes the existing VALUE for KEY and returns the new VALUE.
The DEFAULT-VALUE is used when the entry for KEY is missing.
Returns the new VALUE.
[procededure] (hash-table-copy HASH-TABLE)
Returns a shallow copy of the HASH-TABLE.
[procedure] (hash-table-delete! HASH-TABLE KEY)
Deletes the entry for KEY in the HASH-TABLE.
[procedure] (hash-table-remove! HASH-TABLE PROC)
Calls PROC for all entries in HASH-TABLE with the key and value of each entry. If PROC returns true, then that entry is removed.
[procedure] (hash-table-clear! HASH-TABLE)
Deletes all entries in HASH-TABLE.
[procedure] (hash-table-merge HASH-TABLE-1 HASH-TABLE-2)
Returns a new HASH-TABLE with the union of HASH-TABLE-1 and HASH-TABLE-2.
[procedure] (hash-table-merge! HASH-TABLE-1 HASH-TABLE-2)
Returns HASH-TABLE-1 as the union of HASH-TABLE-1 and HASH-TABLE-2.
[procedure] (hash-table-map HASH-TABLE FUNC)
Calls FUNC for all entries in HASH-TABLE with the key and value of each entry.
Returns a list of the results of each call.
[procedure] (hash-table-fold HASH-TABLE FUNC INIT)
Calls FUNC for all entries in HASH-TABLE with the key and value of each entry, and the current folded value. The initial folded value is INIT.
Returns the final folded value.
[procedure] (hash-table-for-each HASH-TABLE PROC)
Calls PROC for all entries in HASH-TABLE with the key and value of each entry.
[procedure] (hash-table-walk HASH-TABLE PROC)
Calls PROC for all entries in HASH-TABLE with the key and value of each entry.
All hash functions return a fixnum in the range [0 BOUND).
[procedure] (number-hash NUMBER [BOUND])
For use with = as a hash-table-equivalence-function.
[procedure] (object-uid-hash OBJECT [BOUND])
Currently a synonym for equal?-hash.
[procedure] (symbol-hash SYMBOL [BOUND])
For use with eq? as a hash-table-equivalence-function.
[procedure] (keyword-hash KEYWORD [BOUND])
For use with eq? as a hash-table-equivalence-function.
[procedure] (string-hash STRING [BOUND])
For use with string=? as a hash-table-equivalence-function.
[procedure] (string-ci-hash STRING [BOUND])
For use with string-ci=? as a hash-table-equivalence-function.
[procedure] (eq?-hash OBJECT [BOUND])
For use with eq? as a hash-table-equivalence-function.
[procedure] (eqv?-hash OBJECT [BOUND])
For use with eqv? as a hash-table-equivalence-function.
[procedure] (equal?-hash OBJECT [BOUND])
For use with equal? as a hash-table-equivalence-function.
[procedure] (hash OBJECT [BOUND])
Synonym for equal?-hash.
[procedure] (hash-by-identity OBJECT [BOUND])
Synonym for eq?-hash.
Previous: Unit srfi-14 Next: Unit match