Proposal: generalise Monoid's mconcat

Fermin Reig ferminreig at fastmail.fm
Mon Aug 31 17:54:38 UTC 2015


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.


More information about the Libraries mailing list