Proposal: generalise Monoid's mconcat
Petr Pudlák
petr.mvd at gmail.com
Mon Aug 31 20:19:31 UTC 2015
2015-08-31 21:00 GMT+02:00 David Feuer <david.feuer at gmail.com>:
> The theory of mconcat is that it should handle monoids that need to be
> summed in some special way. I don't know if anyone actually uses it so,
> however. Still, Reid is right that the circular dependency sets a very high
> bar.
>
> I guess the [a] monoid is a good example where using mconcat can make a
difference.
What seems to be an omission is that Dual has no implementation of mconcat.
It'd make sense to define 'mconcat = mconcat . reverse' - if the original
monoid benefits from a certain order of operations, we should keep the
order.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20150831/fa0fa165/attachment.html>
More information about the Libraries
mailing list