Type of polymorphic finite partial functions represented as a patricia
tree, 'a
being the type of the arguments and 'b
that of
the values.
For a description of patricia trees see the article "Fast mergeable integer maps" by Chris Okasaki, Andy Gill - Workshop on ML, 1998.
The following represents the function \(x \mapsto 1, y \mapsto 2, z \mapsto 3, w \mapsto 4\):
Branch
(0, 1, Leaf (2131634918, [("x", 1)]),
Branch
(1, 2, Leaf (147666021, [("w", 4)]),
Branch
(3, 4, Leaf (-1524676365, [("y", 2)]),
Leaf (-1991064537, [("z", 3)]))))
Union case | Description |
Full Usage:
Empty
|
|
Full Usage:
Leaf(int, ('a * 'b) list)
Parameters:
int
-
A generic hash used for comparison.
Item2 : ('a * 'b) list
-
The pair of domain-codomain elements.
|