id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
5206,Data.Map: Add a strict version of fromListWith and fromListWithKey,federico_s,,"Add to Data.Map two new functions fromListWith' and fromListWithKey'
with strict evaluation of the combining function.


Example use: computing the histogram of a list of values:

hist xs = toList $ fromListWith' (+) (zip xs [1,1..])

With the standard fromListWith there will be a stack overflow.

How to implement it:

fromListWithKey' f xs = foldl' ins Map.empty xs
  where
    ins t (k,x) = Map.insertWithKey' f k x t

fromListWith' f xs = fromListWithKey' (\_ x y -> f x y) xs
",feature request,closed,normal,,libraries (other),7.0.3,wontfix,"Map, strict evaluation",,Unknown/Multiple,Unknown/Multiple,None/Unknown,,,,,
