Proposal: alpha-rename the type signatures of foldl, foldl', and scanl to be consistent with foldr and scanr
Anthony Cowley
acowley at seas.upenn.edu
Mon Oct 15 23:18:31 CEST 2012
On Sun, Oct 14, 2012 at 10:28 AM, Gábor Lehel <illissius at gmail.com> wrote:
> The total change would be to replace
>
> Prelude.foldl :: (a -> b -> a) -> a -> [b] -> a
> Prelude.scanl :: (a -> b -> a) -> a -> [b] -> [a]
> Data.List.foldl' :: (a -> b -> a) -> a -> [b] -> a
> Data.Foldable.foldl :: (a -> b -> a) -> a -> t b -> a
> Data.Foldable.foldl' :: (a -> b -> a) -> a -> t b -> a
>
> with
>
> Prelude.foldl :: (b -> a -> b) -> b -> [a] -> b
> Prelude.scanl :: (b -> a -> b) -> b -> [a] -> [b]
> Data.List.foldl' :: (b -> a -> b) -> b -> [a] -> b
> Data.Foldable.foldl :: (b -> a -> b) -> b -> t a -> b
> Data.Foldable.foldl' :: (b -> a -> b) -> b -> t a -> b
+1 on this version of the proposal.
Anthony
More information about the Libraries
mailing list