Preface_specs.Contravariant
Contravariant
is a "Contravariant functor". In other word, Contravariant
is the dual of a Functor
.
To have a predictable behaviour, the instance of Contravariant
must obey some laws.
contramap id = id
(contramap f) % (contramap g) = contramap (g % f)
module type WITH_CONTRAMAP = sig ... end
The minimum definition of a Contravariant
. It is by using the combinators of this module that the other combinators will be derived.
module type CORE = WITH_CONTRAMAP
Basis operations.
module type OPERATION = sig ... end
Additional operations.
module type INFIX = sig ... end
Infix operators.
module type API = sig ... end
The complete interface of a Contravariant Functor
.