aelve / haskell-issues

An unofficial issue tracker for all things Haskell-related
18 stars 0 forks source link

containers: Modernize Data.Map #33

Open Gurkenglas opened 8 years ago

Gurkenglas commented 8 years ago

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.