User talk:Freearth

Haskell/MonadPlus Section "Relationship with Monoids" I am not sure if this is a error in the original text:

''Monoids, then, look very similar to MonadPlus instances. Both feature concepts of a zero and plus, and indeed MonadPlus can be a subclass of Monoid (the following is not Haskell 98, but works with -fglasgow-exts):

instance MonadPlus m => Monoid (m a) where mempty = mzero mappend = mplus''

And I think the instance declaration should be:

''instance Monoid (m a) => MonadPlus m where mzero = mempty mplus = mappend ''