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↑
mappend(monoid1, monoid2) | Takes two |
Types ↑
t :: term
Functions
Specs:
Takes two monoid
s and concatenates them.
All collections, such as lists and strings, are monoids. Many other types are monoids too.