Module Monoid.Int

Provides monoids in the Z domain.

By default an addition monoid is provided.

include S with type t = int
include Base with type t = int
type t = int
val zero : t

zero an element that is neutral to plus

val plus : t -> t -> t

plus x y an associative operation.

val concat : t list -> t

concat xs reduces xs to using plus

val (@@) : t -> t -> t

x @@ y is plus x y

module Sum : S with type t = int

A monoind over addition

module Product : S with type t = int

A monoid over product