Proposal: generalise Monoid's mconcat

David Feuer david.feuer at gmail.com
Mon Aug 31 18:03:10 UTC 2015


That sounds reasonable.
On Aug 31, 2015 1:54 PM, "Fermin Reig" <ferminreig at fastmail.fm> wrote:

> We could generalise:
>
> mconcat:: [a] -> a
> mconcat = foldr mappend memtpy
>
> to:
>
> mconcat:: Foldable t => t a -> a
> mconcat = foldr mappend memtpy
> -- even
> -- mconcat = fold
>
>
> Fermin
>
> PS: I cannot find a proposal for this in the archives, apologies if it's
> been raised before and I missed it.
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150831/0818d607/attachment.html>


More information about the Libraries mailing list