Personal tools


From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
(Added a link to "How to Refold a Map.")
(egs, introduce refs)

Revision as of 15:33, 26 January 2009

This article is a stub. You can help by expanding it.

A monoid is an algebraic structure with an associative binary operation that has an identity element. Examples include:

  • lists under concatenation
  • numbers under addition or multiplication
  • Booleans under conjunction or disjunction
  • sets under union
  • functions from a type to itself, under composition

The monoid interface enables a number of algorithms, including parallel algorithms and tree searches, e.g.:

Generalizations of monoids feature in Category theory, for example: