Proposal: add foldMapA to Data.Foldable or Control.Applicative

Vanessa McHale vanessa.mchale at
Wed May 8 01:56:50 UTC 2019

It's relatively easy to define foldMapA, viz.

foldMapA ::  (Monoid b, Traversable t, Applicative f) => (a -> f b) -> t
a -> f b
foldMapA = (fmap fold .) . traverse

I've used found it useful once so far:

Vanessa McHale

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <>

More information about the Libraries mailing list