Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. mapOL :: (a -> b) -> OrdList a -> OrdList b

    ghc GHC.Data.OrdList

    No documentation available.

  2. mapOL' :: (a -> b) -> OrdList a -> OrdList b

    ghc GHC.Data.OrdList

    No documentation available.

  3. mapSmallArray :: (a -> b) -> SmallArray a -> SmallArray b

    ghc GHC.Data.SmallArray

    Map a function over the elements of a SmallArray

  4. mapAccumL_ :: forall m a b c r . Monad m => (c -> a -> m (c, b)) -> c -> Stream m a r -> Stream m b (c, r)

    ghc GHC.Data.Stream

    Note this is not very efficient because it traverses the whole stream before rebuilding it, avoid using it if you can. mapAccumL used to implemented but it wasn't used anywhere in the compiler and has similar efficiency problems.

  5. mapM :: Monad m => (a -> m b) -> Stream m a x -> Stream m b x

    ghc GHC.Data.Stream

    Apply a monadic operation to each element of a Stream, lazily

  6. mapG :: forall (m :: Type -> Type) a b . Functor m => (a -> b) -> GenMap m a -> GenMap m b

    ghc GHC.Data.TrieMap

    No documentation available.

  7. mapAccum :: (a -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)

    ghc GHC.Data.Word64Map.Internal

    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")])
    

  8. mapAccumRWithKey :: (a -> Key -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)

    ghc GHC.Data.Word64Map.Internal

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

  9. mapAccumWithKey :: (a -> Key -> b -> (a, c)) -> a -> Word64Map b -> (a, Word64Map c)

    ghc GHC.Data.Word64Map.Internal

    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")])
    

  10. mapEither :: (a -> Either b c) -> Word64Map a -> (Word64Map b, Word64Map c)

    ghc GHC.Data.Word64Map.Internal

    Map values and separate the Left and Right results.

    let f a = if a < "c" then Left a else Right a
    mapEither f (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
    == (fromList [(3,"b"), (5,"a")], fromList [(1,"x"), (7,"z")])
    
    mapEither (\ a -> Right a) (fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
    == (empty, fromList [(5,"a"), (3,"b"), (1,"x"), (7,"z")])
    

Page 97 of many | Previous | Next