Next: New Hash Mappings, Previous: Hash Tables, Up: Dictionaries
To use double-key hash tables, evaluate the form:
(use-modules (ice-9 hcons))
Eq? hash-consing A hash conser maintains a private universe of pairs s.t. if two cons calls pass eq? arguments, the pairs returned are eq?. A hash conser does not contribute life to the pairs it returns.
Return the hash of pair modulo n. Use an
eq?hash of the car and cdr of pair for the computation.
Return the first element in alist whose car and cdr are
eq?to that of the pair key. Return #f if no match exists.
Return the handle from hash table whose car and cdr are
eq?to that of the pair key.
Create a handle in hash table for pair key and store the initial value init there. Return the handle.
Return the value associated with pair key in hash table, or #f if key is not to be found.
In hash table, associate with pair key the value val.
Add to hash table an entry for the double-key a and d. The associated value is #f. Return the combined key (pair).
Return a procedure that does
hashq-conson hash-tab-or-size. If hash-tab-or-size is a number, allocate and a hash table of that size and use it. The procedure takes two args, a and d, the same as the latter two args ofhashq-cons.
[The following proc really doesn't belong here. –ttn]
Construct a private ring (circular list) of n elements and return a procedure proc that updates it. proc takes one argument, next, which is added to the ring and also returned. An element added in this way remains referenced for the next n
− 1invocations of proc. To “clear” the ring, consecutively call proc with arg #f at least n times.