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

    rio RIO.Vector.Unboxed

    No documentation available.

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

    rio RIO.Vector.Unboxed

    No documentation available.

  3. 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.

  4. 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.

  5. 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.

  6. 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]
    

  7. mapMaybeT :: (m (Maybe a) -> n (Maybe b)) -> MaybeT m a -> MaybeT n b

    errors Control.Error

    Transform the computation inside a MaybeT.

  8. mapII :: (a -> b) -> I a -> I b

    generics-sop Generics.SOP

    Lift the given function.

  9. mapIII :: (a -> b -> c) -> I a -> I b -> I c

    generics-sop Generics.SOP

    Lift the given function.

  10. mapM_ :: HashTable h => ((k, v) -> ST s b) -> h s k v -> ST s ()

    hashtables Data.HashTable.Class

    A side-effecting map over the key-value records of a hash table. O(n).

Page 129 of many | Previous | Next