Proposal: alpha-rename the type signatures of foldl, foldl', and scanl to be consistent with foldr and scanr
danburton.email at gmail.com
Mon Oct 15 18:23:03 CEST 2012
> 'r' is the version I originally used myself (see reddit). But then you
> have to change the foldrs too, and quite possibly a lot of other
This is true, but these are merely alpha-renaming changes, so
the only negative consequence is bikeshedding.
I suggest we restrict the scope of this discussion to
changing (at most) only list functions in the base package.
and get dragged into a big discussion over when is 'r' a
> better mnemonic than 'b' and when is it not.
Indeed. However, I don't think there's really much
that can be said in this discussion, so let's go ahead
and get it over with.
a and b are sufficiently early in the
> alphabet to be generic; “r” might look confusingly special to new users.
There's this. I see the idea here,
but I don't think newcomers will actually have this problem.
One other concern might be that it conflicts with other conventions.
The one that comes to mind is the Reader monad, where "r" is used
in the documentation as the type of the reading environment.
(I personally would prefer Reader to use "e" as a mnemonic for
but that's a whole different discussion.)
Again, I don't think that these differing uses of "r"
will actually cause much strife.
-- Dan Burton
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libraries