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

Lana Black lanablack at amok.cc
Wed May 8 02:04:17 UTC 2019


On May 8, 2019 1:56:50 AM UTC, Vanessa McHale <vanessa.mchale at iohk.io> wrote:
>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:
>http://hackage.haskell.org/package/dir-traverse-0.2.0.0/docs/src/System.Directory.Recursive.html#local-6989586621679024835
>
>Cheers,
>Vanessa McHale

Yes, please! I have found it useful on numerous occasions.


More information about the Libraries mailing list