Proposal: add foldMapWithIndex to Data.Sequence
Bardur Arantsson
spam at scientician.net
Mon May 23 15:27:39 UTC 2016
On 05/20/2016 07:20 PM, David Feuer wrote:
> foldMapWithIndex :: Monoid m
> => (Int -> a -> m) -> Seq a -> m
>
> This would match both Data.Map.foldMapWithKey and
> Control.Lens.Indexed.ifoldMap, filling out the indexed fold menagerie.
>
+1
on the general principle that having as uniform an interface to the
'collections' is a Good Thing.
More information about the Libraries
mailing list