16 Hash Tables
(require unstable/hash) |
This library is unstable
; compatibility will not be maintained.
See Unstable for more information.
Produces the combination of t1 and t2. If either
t1 or t2 has a value for key k, then the
result has the same value for k. If both t1 and
t2 have a value for k, the result has the value
(combine k (hash-ref t1 k) (hash-ref t2 k)) for k.
Examples: |
> (hash-union #hash((b. 0) (a. 5)) #hash((d. 12) (c. 1)) (lambda (k v1 v2) v1)) |
#hash((b. 0) (d. 12) (a. 5) (c. 1)) |
> (hash-union #hash((b. 0) (a. 5)) #hash((a. 12) (c. 1)) (lambda (k v1 v2) v1)) |
#hash((b. 0) (a. 5) (c. 1)) |