The MONOID signature

« 210 Library Documentation

Overview

The value type of an augmented ordered table ascribes to MONOID, which specifies an abstract type $t$ together with an identity $I$, an associative combination function $f$, and a toString function for convenience. The reduced value of a table is given by "summing" all values in the table, with respect to $f$.

Interface

type t
val I : t
val f : t * t → t

val toString : t → string

Types

type t
The abstract type of the monoid.

Values

val I : t
The identity of the monoid. Must satisfy $f (I, x) = x = f (x, I)$ for all monoid elements $x$.
val f : t * t → t
An associative combination function of the monoid.
val toString : t → string
Return a string representation.