Proposal: keep Data.Map.foldWithKey

Ian Lynagh igloo at earth.li
Tue Dec 14 18:42:47 CET 2010


On Tue, Dec 14, 2010 at 01:28:14PM +0100, Christian Maeder wrote:
> 
> I've now created a proper library proposal to keep Data.Map.foldWithKey.
> 
> http://hackage.haskell.org/trac/ghc/ticket/4842

In the ticket you say:

    [keep] Data.Map.foldWithKey as the aim to finally remove this function
    is bad as long as Data.IntMap.foldWithKey is the primary folding
    function for the specialized maps.

but why is keeping foldWithKey the right answer, rather than adding
fold{l,r}WithKey to Data.IntMap (and removing foldWithKey from it)?


Thanks
Ian




More information about the Libraries mailing list