I'm a pretty strong -1 on moving foldrWithIndex into Data.Foldable.

Why?

The only index Foldable can provide is an ordinal index starting at 0.

The one folks _expect_ in many cases from Map k, IntMap and the like is the key.

This introduces a huge source of potential confusion and new name conflicts for marginal benefit.

-Edward

On Thu, Oct 16, 2014 at 1:21 PM, David Feuer <david.feuer@gmail.com> wrote:
Actually, that proposal is firmly in the past. Let's *move* foldrWithIndex and foldlWithIndex from Data.Sequence to Data.Foldable!

On Thu, Oct 16, 2014 at 1:14 PM, David Feuer <david.feuer@gmail.com> wrote:
These functions can be lifted pretty much straight out of Data.Sequence. In particular, foldrWithIndex makes for a particularly nice expression of a fusing findIndices function, as is present in Data.Sequence.


_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://www.haskell.org/mailman/listinfo/libraries