Previous: Double-Key Hash Tables, Up: Dictionaries
To create and use new hash table mappings, evaluate the form:
(use-modules (ice-9 mapping))
Return a mapping object, configured by options.
options are alternating keywords and values, passed to
make-hash-table. Two keywords are handled specially:
#:hash2hash2- hash2 is a procedure that takes two arguments, a key and an integer n. It should return an integer modulo n. If unspecified, the default is
hash.#:equalequal- equal is a procedure that takes two arguments and returns non-#f if they are considered to represent the same key. If unspecified, the default is
equal?.The mapping object prints using hash notation:
(hash-table-mapping #:size 3 #:equal string-ci=?) ⇒ #<mapping hash/string-ci=? 3 4022fcf8>
Return the handle from mapping map for key, or #f if key is not in map.
Return the handle from mapping map for key, or if key is not in map, create a new handle with value default and return the new handle.
Remove key and its associated value from mappping map. Return the handle.