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. mapM_ :: forall m a b (n :: Nat) . Monad m => (a -> m b) -> ListN n a -> m ()

    basement Basement.Sized.List

    Map each element of a List to a monadic action, evaluate these actions sequentially and ignore the results

  2. mapMaybe :: (a -> Maybe b) -> EnumMap k a -> EnumMap k b

    enummapset Data.EnumMap.Lazy

    No documentation available.

  3. mapMaybeWithKey :: Enum k => (k -> a -> Maybe b) -> EnumMap k a -> EnumMap k b

    enummapset Data.EnumMap.Lazy

    No documentation available.

  4. mapMaybe :: (a -> Maybe b) -> EnumMap k a -> EnumMap k b

    enummapset Data.EnumMap.Strict

    No documentation available.

  5. mapMaybeWithKey :: Enum k => (k -> a -> Maybe b) -> EnumMap k a -> EnumMap k b

    enummapset Data.EnumMap.Strict

    No documentation available.

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

    ghc-internal GHC.Internal.Control.Monad

    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.

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

    ghc-internal GHC.Internal.Data.Foldable

    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.

  8. mapMaybe :: (a -> Maybe b) -> [a] -> [b]

    ghc-internal GHC.Internal.Data.Maybe

    The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b. If this is Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

    Examples

    Using mapMaybe f x is a shortcut for catMaybes $ map f x in most cases:
    >>> import GHC.Internal.Text.Read ( readMaybe )
    
    >>> let readMaybeInt = readMaybe :: String -> Maybe Int
    
    >>> mapMaybe readMaybeInt ["1", "Foo", "3"]
    [1,3]
    
    >>> catMaybes $ map readMaybeInt ["1", "Foo", "3"]
    [1,3]
    
    If we map the Just constructor, the entire list should be returned:
    >>> mapMaybe Just [1,2,3]
    [1,2,3]
    

  9. mapM_ :: (Source r a, Index ix, Monad m) => (a -> m b) -> Array r ix a -> m ()

    massiv Data.Massiv.Array

    Map a monadic function over an array sequentially, while discarding the result.

    Examples

    >>> import Data.Massiv.Array as A
    
    >>> rangeStepM Par (Ix1 10) 12 60 >>= A.mapM_ print
    10
    22
    34
    46
    58
    

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

    protolude Protolude

    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 31 of many | Previous | Next