UnionFind.PAIR
We need to be able to hash and compare keys, and values need to form a monoid
type key
type value
val hash : key -> int
val equal : key -> key -> bool
val merge : value -> value -> value
Should be associative commutative
val zero : value
Neutral element of merge
merge