Changes to the Monoids section of the Basics chapter

This commit is contained in:
Christian Sievers 2015-02-13 22:28:27 +01:00
parent 363eb58099
commit 8073d55aaf

View File

@ -508,8 +508,8 @@ Monoids
-------
Monoids provide an interface for structures which have an associative operation
(``mappend``) and a neutral element (``mempty``) which is the zero for the join
operation.
(``mappend``, there is also the synonym ``<>``) and a neutral
(also: unit or zero) element (``mempty``) for that operation.
```haskell
class Monoid a where
@ -518,7 +518,8 @@ class Monoid a where
mconcat :: [a] -> a
```
The canonical example is the list type with the zero being the empty list.
The canonical example is the list type with concatenation as the operation
and the empty list as zero.
```haskell
import Data.Monoid