MonadEx v1.1.0 Monoid protocol

Monoids have two principle operations: empty/zero and append.

This protocol doesn’t have an empty function due to the limitations of Elixir protocols. I can implement this functionality using Behaviours, but I haven’t done so yet.

Summary

Functions

Takes two monoids and concatenates them

Types

t()
t :: term

Functions

mappend(monoid1, monoid2)
mappend(t, t) :: t

Takes two monoids and concatenates them.

All collections, such as lists and strings, are monoids. Many other types are monoids too.