Module Alg_structs__.Monoid


module type Seed = sig ... end

The Seed needed to generate an implementation of Monoid for the type t


module type S = sig ... end

A monoid is a set of objects with an associative binary operation over it and a privileged unit element that acts as an identity.


module Law : functor (M : S) -> sig ... end

Law notes the laws that should be obeyed by any instantiation of Monoid in the form of predicates that should hold true for any arguments of the appropriate type.


Module functors for creating implementations of Monoid

module Make : functor (Seed : Seed) -> S with type t = Seed.t

Make S is a implementation of Monoid grown from the implementation of the Seed.

val make : 'a -> ('a -> 'a -> 'a) -> (module S with type t = 'a)

make (unit : t) (op : t -> t -> t) is an implementation of Monoid over the type t with the given unit and op

val of_semigroup : (module Alg_structs.Semigroup.S with type t = 'a) -> 'a -> (module S with type t = 'a)

of_semigroup semi unit forms an implementation of Monoid by enriching the give semigroup semi with the unit


module Bool : sig ... end

Monoids over bool

module Int : sig ... end

Monoids over int

module Option : sig ... end

Semigroups over option types

module Endo : sig ... end

See Semigroup.Endo

module Dual : sig ... end

See Semigroup.Dual