Various folds in the containers package

Duncan Coutts duncan.coutts at googlemail.com
Mon Jun 20 19:12:44 CEST 2011


On Mon, 2011-06-20 at 18:49 +0200, Milan Straka wrote:

> > Milan: so that's another good argument in favour of providing a Foldable
> > instance. (And also of having foldl' and foldr' as Foldable class
> > methods)
> 
> We actually do provide Foldable instance now, but we define only
> foldMap. I will add implementation for all other methods to achieve best
> complexity.

Great.

> Having foldl' and foldr' in Foldable class would be great. If that
> happens, we would definitely add specialised implementations.

I've just sent a new proposal for exactly that.


Duncan




More information about the Libraries mailing list