Hoogle Search

Within LTS Haskell 24.33 (ghc-9.10.3)

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

  1. mapFst :: (a -> b) -> (a, c) -> (b, c)

    fgl Data.Graph.Inductive.Query.Monad

    No documentation available.

  2. mapSnd :: (a -> b) -> (c, a) -> (c, b)

    fgl Data.Graph.Inductive.Query.Monad

    No documentation available.

  3. mapGenericUnitInfo :: (uid1 -> uid2) -> (srcpkg1 -> srcpkg2) -> (srcpkgname1 -> srcpkgname2) -> (modname1 -> modname2) -> (mod1 -> mod2) -> GenericUnitInfo srcpkg1 srcpkgname1 uid1 modname1 mod1 -> GenericUnitInfo srcpkg2 srcpkgname2 uid2 modname2 mod2

    ghc-boot GHC.Unit.Database

    Convert between GenericUnitInfo instances

  4. mapIOException :: Exception e => (IOException -> e) -> IO a -> IO a

    network-transport Network.Transport.Internal

    Translate exceptions that arise in IO computations

  5. mapToFst :: (a -> b) -> a -> (b, a)

    relude Relude.Extra.Tuple

    Deprecated: Use toFst from Tuple instead

  6. mapToSnd :: (a -> b) -> a -> (a, b)

    relude Relude.Extra.Tuple

    Deprecated: Use toSnd from Tuple instead

  7. mapAccumL :: Traversable t => (s -> a -> (s, b)) -> s -> t a -> (s, t b)

    relude Relude.Foldable.Reexport

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

    Examples

    Basic usage:
    >>> mapAccumL (\a b -> (a + b, a)) 0 [1..10]
    (55,[0,1,3,6,10,15,21,28,36,45])
    
    >>> mapAccumL (\a b -> (a <> show b, a)) "0" [1..5]
    ("012345",["0","01","012","0123","01234"])
    

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

    relude Relude.Foldable.Reexport

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

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

    relude Relude.Foldable.Reexport

    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.

  10. mapM_ :: (Foldable t, Monad m) => (a -> m b) -> t a -> m ()

    relude Relude.Foldable.Reexport

    Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM. mapM_ is just like traverse_, but specialised to monadic actions.

Page 138 of many | Previous | Next