#4313: Proposal: Add left, right and strict folds to Data.Set, Data.IntMap and
Data.IntSet to mimic Data.Map.
---------------------------------+------------------------------------------
    Reporter:  milan             |       Owner:                   
        Type:  task              |      Status:  new              
    Priority:  normal            |   Component:  libraries (other)
     Version:  6.12.3            |    Keywords:  containers       
    Testcase:                    |   Blockedby:  4278, 4280       
          Os:  Unknown/Multiple  |    Blocking:                   
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown     
---------------------------------+------------------------------------------

Comment(by milan):

 Replying to [comment:3 tibbe]:
 > I'd be against adding both the value-only and key/value folds. In fact I
 think we should only have the key/value folds as they are as efficient as
 the value-only folds. Having both bloats the API. It's already bloated as
 is.

 Fine by me.

 BTW, I just found out that the order of foldlWithKey is inconsistent:
 Data.Map.foldlWithKey    :: (b -> k -> a -> b) -> b -> Map k a -> b
 Data.IntMap.foldlWithKey :: (Key->b -> a -> b) -> b -> IntMap a-> b

 I like that the Data.IntMap variant works well with 'const' to produce
 foldl. But the order of the parameters is a bit illogical then.

 Any suggestions?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4313#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to