Re: Proposal: alpha-rename the type signatures of foldl, foldl', and scanl to be consistent with foldr and scanr
Thomas Schilling <[email protected]>
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc,gmane.comp.lang.haskell.libraries |
|---|---|
| Message-ID | <CAOJG3uCY1sj0x213L5x4hp3964mCzQxy0yY-SbQ0b57zmaQLww@mail.gmail.com> |
On 14 October 2012 15:28, Gábor Lehel <[email protected]> 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 > > I've attached a patch. +1 We do indeed have a bit of a culture of using too short names for type variables, but they are fine in this case. -- Push the envelope. Watch it bend.