Monoids

Each Monoid provides a means to represent a binary operation and is usually locked down to a specific type. These are great when you need to combine a list of values down to one value. In this library, any ADT that provides both an empty and a concat function can be used as a Monoid. There are a few of the crocks that are also monoidial, so be on the look out for those as well.

All Monoids work with the following helper functions mconcat, mreduce, mconcatMap and mreduceMap.

All Monoids provide empty functions on their Constructors as well as the following Instance Functions: valueOf, empty and concat.

MonoidTypeOperationEmpty (Identity)
AllBooleanLogical ANDtrue
AnyBooleanLogical ORfalse
AssignObjectObject.assign{lb}{rb}
EndoFunctioncomposeidentity
FirstMaybeFirst JustNothing
LastMaybeLast JustNothing
MaxNumberMath.max-Infinity
MinNumberMath.minInfinity
ProdNumberMultiplication1
SumNumberAddition0