Hoogle Search
Within LTS Haskell 24.28 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
mapKeys :: (Key s -> Int) -> IntMap s a -> SomeIntMapWith (MapProof 'Int s Int Int) arefined-containers Data.IntMap.Strict.Refined mapKeys f m applies f to each key of m and collects the results into a new map. For keys that were mapped to the same new key, the value corresponding to the greatest of the original keys is retained.
-
refined-containers Data.IntMap.Strict.Refined mapKeysWith c f m applies f to each key of m and collects the results into a new map. For keys that were mapped to the same new key, c acts as the combining function for corresponding values.
mapMaybe :: forall s a b . (a -> Maybe b) -> IntMap s a -> SomeIntMapWith (SupersetProof 'Int s) brefined-containers Data.IntMap.Strict.Refined Apply a function to all values in a map and collect only the Just results, returning a potentially smaller map.
mapMaybeWithKey :: (Key s -> a -> Maybe b) -> IntMap s a -> SomeIntMapWith (SupersetProof 'Int s) brefined-containers Data.IntMap.Strict.Refined Apply a function to all values in a map, together with their corresponding keys, and collect only the Just results, returning a potentially smaller map.
mapWithKey :: (Key s -> a -> b) -> IntMap s a -> IntMap s brefined-containers Data.IntMap.Strict.Refined Apply a function to all values in a map, together with their corresponding keys, that are proven to be in the map. The set of keys remains the same.
-
refined-containers Data.Map.Refined Thread an accumularing argument through the map in ascending order of keys.
-
refined-containers Data.Map.Refined Thread an accumularing argument through the map in descending order of keys.
-
refined-containers Data.Map.Refined Apply a function to all values in a map and collect the Left and Right results into separate (disjoint) maps.
-
refined-containers Data.Map.Refined Apply a function to all values in a map, together with their corresponding keys, and collect the Left and Right results into separate (disjoint) maps.
-
refined-containers Data.Map.Refined mapKeys f m applies f to each key of m and collects the results into a new map. For keys that were mapped to the same new key, the value corresponding to the greatest of the original keys is retained.