[Haskell-beginners] Monoids and Groups

Brandon Allbery allbery.b at gmail.com
Wed Mar 25 14:07:17 UTC 2015


On Wed, Mar 25, 2015 at 10:02 AM, Shishir Srivastava <
shishir.srivastava at gmail.com> wrote:

> Reading about Monoids it seems they derive a lot on the algebraic
> structures of 'Groups' ?
>

A monoid is a semigroup with an identity element, and as such inherits much
of its behavior from semigroups.

For historical reasons, a Haskell Monoid is not based on a notional Haskell
Semigroup. There are packages that add semigroups and other algebraic
structures, and even alternative Preludes that provide a reasonably
complete set of algebraic structures. Every so often you'll see
bikeshedding in the Haskell community over whether the default Prelude
should provide some or all of these. :)

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150325/acebffe1/attachment.html>


More information about the Beginners mailing list