Hoogle Search

Within LTS Haskell 24.18 (ghc-9.10.3)

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

  1. mapMaybe :: forall (m :: Type -> Type) a b . Monad m => (a -> Maybe b) -> Stream m a -> Stream m b

    streamly-core Streamly.Data.Stream

    Map a Maybe returning function to a stream, filter out the Nothing elements, and return a stream of values extracted from Just. Equivalent to:

    >>> mapMaybe f = Stream.catMaybes . fmap f
    

  2. mapMaybeM :: Monad m => (a -> m (Maybe b)) -> Stream m a -> Stream m b

    streamly-core Streamly.Data.Stream

    Like mapMaybe but maps a monadic function. Equivalent to:

    >>> mapMaybeM f = Stream.catMaybes . Stream.mapM f
    
    >>> mapM f = Stream.mapMaybeM (\x -> Just <$> f x)
    

  3. mapMStep :: Applicative m => (a -> m b) -> Step s a -> m (Step s b)

    streamly-core Streamly.Internal.Data.Fold

    Map a monadic function over the result b in Step s b. Internal

  4. mapMaybe :: forall (m :: Type -> Type) a b r . Monad m => (a -> Maybe b) -> Fold m b r -> Fold m a r

    streamly-core Streamly.Internal.Data.Fold

    mapMaybe f fold maps a Maybe returning function f on the input of the fold, filters out Nothing elements, and return the values extracted from Just.

    >>> mapMaybe f = Fold.lmap f . Fold.catMaybes
    
    >>> mapMaybe f = Fold.mapMaybeM (return . f)
    
    >>> f x = if even x then Just x else Nothing
    
    >>> fld = Fold.mapMaybe f Fold.toList
    
    >>> Stream.fold fld (Stream.enumerateFromTo 1 10)
    [2,4,6,8,10]
    

  5. mapMaybeM :: Monad m => (a -> m (Maybe b)) -> Fold m b r -> Fold m a r

    streamly-core Streamly.Internal.Data.Fold

    >>> mapMaybeM f = Fold.lmapM f . Fold.catMaybes
    

  6. mapM_ :: Monad m => (a -> m b) -> Stream m a -> m ()

    streamly-core Streamly.Internal.Data.Stream

    Execute a monadic action for each element of the Stream

  7. mapMaybe :: forall (m :: Type -> Type) a b . Monad m => (a -> Maybe b) -> Stream m a -> Stream m b

    streamly-core Streamly.Internal.Data.Stream

    Map a Maybe returning function to a stream, filter out the Nothing elements, and return a stream of values extracted from Just. Equivalent to:

    >>> mapMaybe f = Stream.catMaybes . fmap f
    

  8. mapMaybeM :: Monad m => (a -> m (Maybe b)) -> Stream m a -> Stream m b

    streamly-core Streamly.Internal.Data.Stream

    Like mapMaybe but maps a monadic function. Equivalent to:

    >>> mapMaybeM f = Stream.catMaybes . Stream.mapM f
    
    >>> mapM f = Stream.mapMaybeM (\x -> Just <$> f x)
    

  9. mapMSerial :: Monad m => (a -> m b) -> StreamK m a -> StreamK m b

    streamly-core Streamly.Internal.Data.StreamK

    No documentation available.

  10. mapMWith :: (m b -> StreamK m b -> StreamK m b) -> (a -> m b) -> StreamK m a -> StreamK m b

    streamly-core Streamly.Internal.Data.StreamK

    No documentation available.

Page 50 of many | Previous | Next