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.
-
IntervalMap Data.IntervalMap.Generic.Lazy O(n). Map keys/values and separate the Left and Right results.
mapKeys :: (Interval k2 e, Ord k2) => (k1 -> k2) -> IntervalMap k1 a -> IntervalMap k2 aIntervalMap Data.IntervalMap.Generic.Lazy O(n log n). mapKeys f s is the map obtained by applying f to each key of s. The size of the result may be smaller if f maps two or more distinct keys to the same new key. In this case the value at the smallest of these keys is retained.
mapKeysMonotonic :: (Interval k2 e, Ord k2) => (k1 -> k2) -> IntervalMap k1 a -> IntervalMap k2 aIntervalMap Data.IntervalMap.Generic.Lazy O(n). mapKeysMonotonic f s == mapKeys f s, but works only when f is strictly monotonic. That is, for any values x and y, if x < y then f x < f y. The precondition is not checked.
-
IntervalMap Data.IntervalMap.Generic.Lazy O(n log n). mapKeysWith c f s is the map obtained by applying f to each key of s. The size of the result may be smaller if f maps two or more distinct keys to the same new key. In this case the associated values will be combined using c.
mapMaybe :: Interval k e => (a -> Maybe b) -> IntervalMap k a -> IntervalMap k bIntervalMap Data.IntervalMap.Generic.Lazy O(n). Map values and collect the Just results.
mapMaybeWithKey :: Interval k e => (k -> a -> Maybe b) -> IntervalMap k a -> IntervalMap k bIntervalMap Data.IntervalMap.Generic.Lazy O(n). Map keys/values and collect the Just results.
mapWithKey :: (k -> a -> b) -> IntervalMap k a -> IntervalMap k bIntervalMap Data.IntervalMap.Generic.Lazy O(n). Map a function over all values in the map.
mapAccum :: (a -> b -> (a, c)) -> a -> IntervalMap k b -> (a, IntervalMap k c)IntervalMap Data.IntervalMap.Generic.Strict O(n). The function mapAccum threads an accumulating argument through the map in ascending order of keys.
let f a b = (a ++ b, b ++ "X") mapAccum f "Everything: " (fromList [(5,"a"), (3,"b")]) == ("Everything: ba", fromList [(3, "bX"), (5, "aX")])mapAccumRWithKey :: (a -> k -> b -> (a, c)) -> a -> IntervalMap k b -> (a, IntervalMap k c)IntervalMap Data.IntervalMap.Generic.Strict O(n). The function mapAccumRWithKey threads an accumulating argument through the map in descending order of keys.
mapAccumWithKey :: (a -> k -> b -> (a, c)) -> a -> IntervalMap k b -> (a, IntervalMap k c)IntervalMap Data.IntervalMap.Generic.Strict O(n). The function mapAccumWithKey threads an accumulating argument through the map in ascending order of keys.
let f a k b = (a ++ " " ++ (show k) ++ "-" ++ b, b ++ "X") mapAccumWithKey f "Everything:" (fromList [(5,"a"), (3,"b")]) == ("Everything: 3-b 5-a", fromList [(3, "bX"), (5, "aX")])