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

Andreas Abel andreas.abel at ifi.lmu.de
Sun Oct 14 20:33:05 CEST 2012


+1

On 14.10.12 7:01 PM, Simon Hengel 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

-- 
Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel at ifi.lmu.de
http://www2.tcs.ifi.lmu.de/~abel/



More information about the Libraries mailing list