Proposal: alpha-rename the type signatures of foldl, foldl', and scanl to be consistent with foldr and scanr

Ian Lynagh ian at well-typed.com
Sat Nov 10 15:19:20 CET 2012


Hi Bas,

On Fri, Nov 09, 2012 at 11:32:05AM +0100, Bas van Dijk wrote:
> 
> I think you missed some fixes in Data.Foldable from the original patch:
> 
> foldl :: (a -> b -> a) -> a -> t b -> a    to:
> foldl :: (b -> a -> b) -> b -> t a -> b
> 
> foldl' :: (a -> b -> a) -> a -> t b -> a    to:
> foldl' :: (b -> a -> b) -> b -> t a -> b

These are already done as far as I can see?

> foldlM :: (Foldable t, Monad m) => (a -> b -> m a) -> a -> t b -> m a    to:
> foldlM :: (Foldable t, Monad m) => (b -> a -> m b) -> b -> t a -> m b

I'll do this one.


Thanks
Ian




More information about the Libraries mailing list