Proposal #2769: Export mapAccumR from Data.Map, Data.IntMap

Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2769 Discussion period: 1 week The `mapAccumR` function has been written in both the Data.Map and IntMap sources but it's commented out and not exported. This seems to be an error and I propose that it be simply uncommented. The issue can be worked around by using Data.List.mapAccumL on the descending list representation of the Map, but that's hardly optimal. Seems like a no-brainer to me, hence the short discussion period.

On Tue, Nov 11, 2008 at 11:14:25PM +0200, Matti Niemenmaa wrote:
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/2769 Discussion period: 1 week
The `mapAccumR` function has been written in both the Data.Map and IntMap sources but it's commented out and not exported. This seems to be an error and I propose that it be simply uncommented.
The issue can be worked around by using Data.List.mapAccumL on the descending list representation of the Map, but that's hardly optimal.
Data.Traversable.mapAccumR also works on maps, but has a different type (matching the one on lists, and Data.Map.mapAccum). I would suggest that mapAccumRWithKey would be a consistent name for this one.
Seems like a no-brainer to me, hence the short discussion period.
I think a week is too short, even for no-brainers. People take breaks.

Ross Paterson wrote:
Data.Traversable.mapAccumR also works on maps, but has a different type (matching the one on lists, and Data.Map.mapAccum). I would suggest that mapAccumRWithKey would be a consistent name for this one.
Handy, I didn't know that. In that light I agree with you on the name.
I think a week is too short, even for no-brainers. People take breaks.
I'm not in any particular hurry: let's then say two weeks, for now.
participants (2)
-
Matti Niemenmaa
-
Ross Paterson