This package offers a general typeclass
Mapping for data structures which represent
functions k -> v (possibly for fixed k, but arbitrary ordered
v).
There are some fairly straightforward examples: constant mappings, and
those which build up mappings where k is Either, or a pair, or
Maybe, or Bool.
Three less trivial implementations are provided:
-
Decision diagrams, with nodes which may themselves be an arbitrary
Mapping; -
Piecewise constant maps on an ordered domain
k;