Hoogle Search

Within LTS Haskell 24.50 (ghc-9.10.3)

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

  1. mapAccumR :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)

    ghc-internal GHC.Internal.Data.Traversable

    The mapAccumR function behaves like a combination of fmap and foldr; it applies a function to each element of a structure, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new structure.

    Examples

    Basic usage:
    >>> mapAccumR (\a b -> (a + b, a)) 0 [1..10]
    (55,[54,52,49,45,40,34,27,19,10,0])
    
    >>> mapAccumR (\a b -> (a <> show b, a)) "0" [1..5]
    ("054321",["05432","0543","054","05","0"])
    

  2. mapM :: (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b)

    ghc-internal GHC.Internal.Data.Traversable

    Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.

    Examples

    mapM is literally a traverse with a type signature restricted to Monad. Its implementation may be more efficient due to additional power of Monad.

  3. mapExceptionContext :: (ExceptionContext -> ExceptionContext) -> SomeException -> SomeException

    ghc-internal GHC.Internal.Exception.Type

    No documentation available.

  4. mapConcurrently :: (Traversable t, MonadBaseControl IO m) => (a -> m b) -> t a -> m (t b)

    lifted-async Control.Concurrent.Async.Lifted

    Generalized version of mapConcurrently.

  5. mapConcurrently_ :: (Foldable t, MonadBaseControl IO m) => (a -> m b) -> t a -> m ()

    lifted-async Control.Concurrent.Async.Lifted

    Generalized version of mapConcurrently_.

  6. mapConcurrently :: (Traversable t, MonadBaseControl IO m, Forall (Pure m)) => (a -> m b) -> t a -> m (t b)

    lifted-async Control.Concurrent.Async.Lifted.Safe

    Generalized version of mapConcurrently.

  7. mapConcurrently_ :: (Foldable t, MonadBaseControl IO m, Forall (Pure m)) => (a -> m b) -> t a -> m ()

    lifted-async Control.Concurrent.Async.Lifted.Safe

    Generalized version of mapConcurrently_.

  8. mapIO :: forall r ix b r' a m . (Size r', Load r' ix a, Manifest r b, MonadUnliftIO m) => (a -> m b) -> Array r' ix a -> m (Array r ix b)

    massiv Data.Massiv.Array

    Map an IO action over an Array. Underlying computation strategy is respected and will be parallelized when requested. Unfortunately no fusion is possible and new array will be create upon each call.

  9. mapIO_ :: forall r ix e a m . (Load r ix e, MonadUnliftIO m) => (e -> m a) -> Array r ix e -> m ()

    massiv Data.Massiv.Array

    Similar to mapIO, but ignores the result of mapping action and does not create a resulting array, therefore it is faster. Use this instead of mapIO when result is irrelevant. Most importantly it will follow the iteration logic outlined by the supplied array.

  10. mapM :: forall r ix b r' a m . (Source r' a, Manifest r b, Index ix, Monad m) => (a -> m b) -> Array r' ix a -> m (Array r ix b)

    massiv Data.Massiv.Array

    Map a monadic action over an array sequentially.

Page 160 of many | Previous | Next