[Haskell-cafe] Why there is not standard Monoid instance for
ZipList a?
Vladimir Reshetnikov
v.reshetnikov at gmail.com
Fri Oct 16 05:52:45 EDT 2009
I find the following instance very convenient:
------------------------------------------------------------------------
import Data.Monoid
import Control.Applicative
instance Monoid a => Monoid (ZipList a) where
mempty = pure mempty
mappend = liftA2 mappend
------------------------------------------------------------------------
Any reason why it is not in the standard library?
Thanks,
Vladimir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091016/2ea2e0e2/attachment.html
More information about the Haskell-Cafe
mailing list