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.

  1. mapAccumRWithKey :: (a -> k -> b -> (a, c)) -> a -> IntervalMap k b -> (a, IntervalMap k c)

    IntervalMap Data.IntervalMap.Strict

    O(n). The function mapAccumRWithKey threads an accumulating argument through the map in descending order of keys.

  2. mapAccumWithKey :: (a -> k -> b -> (a, c)) -> a -> IntervalMap k b -> (a, IntervalMap k c)

    IntervalMap Data.IntervalMap.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")])
    

  3. mapEither :: Interval k e => (a -> Either b c) -> IntervalMap k a -> (IntervalMap k b, IntervalMap k c)

    IntervalMap Data.IntervalMap.Strict

    O(n). Map values and separate the Left and Right results.

  4. mapEitherWithKey :: Interval k e => (k -> a -> Either b c) -> IntervalMap k a -> (IntervalMap k b, IntervalMap k c)

    IntervalMap Data.IntervalMap.Strict

    O(n). Map keys/values and separate the Left and Right results.

  5. mapKeys :: (Interval k2 e, Ord k2) => (k1 -> k2) -> IntervalMap k1 a -> IntervalMap k2 a

    IntervalMap Data.IntervalMap.Strict

    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.

  6. mapKeysMonotonic :: (Interval k2 e, Ord k2) => (k1 -> k2) -> IntervalMap k1 a -> IntervalMap k2 a

    IntervalMap Data.IntervalMap.Strict

    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.

  7. mapKeysWith :: (Interval k2 e, Ord k2) => (a -> a -> a) -> (k1 -> k2) -> IntervalMap k1 a -> IntervalMap k2 a

    IntervalMap Data.IntervalMap.Strict

    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.

  8. mapMaybe :: Interval k e => (a -> Maybe b) -> IntervalMap k a -> IntervalMap k b

    IntervalMap Data.IntervalMap.Strict

    O(n). Map values and collect the Just results.

  9. mapMaybeWithKey :: Interval k e => (k -> a -> Maybe b) -> IntervalMap k a -> IntervalMap k b

    IntervalMap Data.IntervalMap.Strict

    O(n). Map keys/values and collect the Just results.

  10. mapWithKey :: (k -> a -> b) -> IntervalMap k a -> IntervalMap k b

    IntervalMap Data.IntervalMap.Strict

    O(n). Map a function over all values in the map.

Page 331 of many | Previous | Next