Monoid

algebraic structure with an associative operation and a neutral elementary

In abstract algebra, a monoid is a set of elements with two key properties

  1. It can be combined associatively; e.g.
  2. There exists an identity element; e.g. , or

In computing science common monoids include addition, multiplication, or, and. These properties are useful for various problems e.g. they allow a large set of data to be divided, processed in parallel and combined. As each part produces a Monoid, the final combined result will be the same. This also works with more complex Monoids e.g. a map of word counts.

Other websitesEdit

  Haskell/Monoids at Wikibooks