Preface_specs.Monoid
A Monoid
is a type t
which provides a binary associative operation combine
and a neutral element (neutral
). In other words, a Monoid
is a Semigroup
with a neutral element.
To ensure that the derived combiners work properly, a functor should respect these laws:
combine (combine a b) c = combine a (combine b c)
(from Semigroup
)combine x neutral = combine neutral x = x
module type WITH_NEUTRAL = sig ... end
A type t
with a neutral element. This signature is mainly used to enrich a Semigroup
with a neutral element.
module type WITH_NEUTRAL_AND_COMBINE = sig ... end
module type CORE = WITH_NEUTRAL_AND_COMBINE
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 Monoid
.