@hackage mappings0.4.0.0
Types which represent functions k -> v
Installation
Dependencies (8)
- base >=4.16 && <4.23
- cond >=0.5.1 && <0.6
- containers >=0.6.5 && <0.9
- formatting >=7.0.0 && <7.3
- indexed-traversable >=0.1.1 && <0.2
- partialord >=0.0.2 && <0.2 Show all…
Dependents (0)
Mappings
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;