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 :: (Monad m, Storable a, Storable b) => (a -> m b) -> Vector a -> m (Vector b)

    rio RIO.Vector.Storable

    No documentation available.

  2. mapM_ :: (Monad m, Storable a) => (a -> m b) -> Vector a -> m ()

    rio RIO.Vector.Storable

    No documentation available.

  3. mapMaybe :: (Storable a, Storable b) => (a -> Maybe b) -> Vector a -> Vector b

    rio RIO.Vector.Storable

    No documentation available.

  4. mapM :: (Monad m, Unbox a, Unbox b) => (a -> m b) -> Vector a -> m (Vector b)

    rio RIO.Vector.Unboxed

    No documentation available.

  5. mapM_ :: (Monad m, Unbox a) => (a -> m b) -> Vector a -> m ()

    rio RIO.Vector.Unboxed

    No documentation available.

  6. mapMaybe :: (Unbox a, Unbox b) => (a -> Maybe b) -> Vector a -> Vector b

    rio RIO.Vector.Unboxed

    No documentation available.

  7. mapWriter :: ((a, w) -> (b, w')) -> Writer w a -> Writer w' b

    rio RIO.Writer

    Map both the return value and output of a computation using the given function.

  8. mapWriterT :: (m (a, w) -> n (b, w')) -> WriterT w m a -> WriterT w' n b

    rio RIO.Writer

    Map both the return value and output of a computation using the given function.

  9. mapExceptT :: (m (Either e a) -> n (Either e' b)) -> ExceptT e m a -> ExceptT e' n b

    errors Control.Error

    Map the unwrapped computation using the given function.

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

    errors Control.Error

    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]
    

Page 128 of many | Previous | Next