1 module Gargantext.Data.HashMap.Strict.Utils where
3 import Data.Hashable (Hashable)
4 import Data.HashMap.Strict (HashMap)
5 import qualified Data.HashMap.Strict as HM
6 import Gargantext.Prelude
9 unionsWith :: (Foldable f, Eq k, Hashable k) => (a->a->a) -> f (HashMap k a) -> HashMap k a
10 unionsWith f = foldl' (HM.unionWith f) HM.empty
12 partition :: Hashable k => (a -> Bool) -> HashMap k a -> (HashMap k a, HashMap k a)
16 partitionWithKey :: Hashable k => (k -> a -> Bool) -> HashMap k a -> (HashMap k a, HashMap k a)
17 partitionWithKey = undefined
19 findMax :: Hashable k => HashMap k a -> (k, a)
22 -- getKeyWithMaxValue :: Hashable k => HashMap k a -> Maybe k
23 getKeyWithMaxValue :: Hashable k => HashMap k a -> [k]
24 getKeyWithMaxValue = undefined