Previous: , Up: SRFI-69   [Contents][Index] Hash table algorithms

Each hash table carries an equivalence function and a hash function, used to implement key lookups. Beginning users should follow the rules for consistency of the default hash-proc specified above. Advanced users can use these to implement their own equivalence and hash functions for specialized lookup semantics.

Scheme Procedure: hash-table-equivalence-function hash-table
Scheme Procedure: hash-table-hash-function hash-table

Answer the equivalence and hash function of hash-table, respectively.

Scheme Procedure: hash obj [size]
Scheme Procedure: string-hash obj [size]
Scheme Procedure: string-ci-hash obj [size]
Scheme Procedure: hash-by-identity obj [size]

Answer a hash value appropriate for equality predicate equal?, string=?, string-ci=?, and eq?, respectively.

hash is a backwards-compatible replacement for Guile’s built-in hash.