Next: , Up: Weak References


29.2.1 Weak key hashes

As with any hash table, choosing a good size for the table requires some caution. You can modify weak hash tables in exactly the same way you would modify regular hash tables. See Hash Tables.

— Scheme Procedure: weak-key-hash-table? obj
— C Function: scm_weak_key_hash_table_p (obj)

Return #t iff obj is a weak key hash table.

— Scheme Procedure: make-weak-key-hash-table k
— C Function: scm_make_weak_key_hash_table (k)

Return a hash table with weak keys with k buckets.

— Scheme Procedure: weak-value-hash-table? obj
— C Function: scm_weak_value_hash_table_p (obj)

Return #t iff obj is a weak value hash table.

— Scheme Procedure: make-weak-value-hash-table k
— C Function: scm_make_weak_value_hash_table (k)

Return a hash table with weak values with k buckets.

— Scheme Procedure: doubly-weak-hash-table? obj
— C Function: scm_doubly_weak_hash_table_p (obj)

Return #t iff obj is a doubly weak hash table. Note that a doubly weak hash table is neither a weak key nor a weak value hash table.

— Scheme Procedure: make-doubly-weak-hash-table k
— C Function: scm_make_doubly_weak_hash_table (k)

Return a hash table with weak keys and values with k buckets.