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

Joachim Breitner mail at joachim-breitner.de
Sun Oct 14 21:26:42 CEST 2012


Hi,

Am Sonntag, den 14.10.2012, 16:28 +0200 schrieb Gábor Lehel:
>     foldl :: (b -> a -> b) -> b -> [a] -> b
>     foldr :: (a -> b -> b) -> b -> [a] -> b
>     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.

Also preferring this over “r”; a and b are sufficiently early in the
alphabet to be generic; “r” might look confusingly special to new users.

Greetings,
Joachim 
-- 
Joachim "nomeata" Breitner
  mail at joachim-breitner.de  |  nomeata at debian.org  |  GPG: 0x4743206C
  xmpp: nomeata at joachim-breitner.de | http://www.joachim-breitner.de/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/libraries/attachments/20121014/01040d62/attachment.pgp>


More information about the Libraries mailing list