
6 Feb
2008
6 Feb
'08
7:33 p.m.
On 06/02/2008, Ross Paterson
On Tue, Feb 05, 2008 at 12:03:38AM -0500, Cale Gibbard wrote:
Are many people using mapAccumR? How much would it hurt to change it?
It's specified in the Haskell 98 Report, so changing it is a big deal. Personally, I think the types should have been
mapAccumL :: (s -> a -> (b,s)) -> s -> [a] -> ([b],s) mapAccumR :: (a -> s -> (s,b)) -> [a] -> s -> (s,[b])
to show which direction the state flows.