The class of monoids (types with an associative binary operation that
has an identity). Instances should satisfy the following laws:
The method names refer to the monoid of lists under concatenation, but
there are many other instances.
Some types can be viewed as a monoid in more than one way, e.g. both
addition and multiplication on numbers. In such cases we often define
newtypes and make those instances of
Monoid, e.g.
Sum and
Product.