haskell-issues icon indicating copy to clipboard operation
haskell-issues copied to clipboard

containers: Modernize Data.Map

Open Gurkenglas opened this issue 8 years ago • 0 comments

fromListWith should be generalized to Foldable, and we need fromListMap functions (Foldable t, Monoid m) => (a -> m) -> t (k, a) -> Map k m and perhaps (Foldable t, Monoid m) => (k -> m) -> t k -> Map k m. Admittedly the last one is probably just to implement histogram :: Foldable t => t k -> Map k Int, but in the end even putting histogram itself into Data.Map would be ok in my book.

Gurkenglas avatar Apr 03 '16 07:04 Gurkenglas