Hoogle Search

Within LTS Haskell 24.4 (ghc-9.10.2)

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

  1. mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]

    distribution-opensuse OpenSuse.Prelude

    A version of mapMaybe that works with a monadic predicate.

  2. mappend :: Monoid a => a -> a -> a

    distribution-opensuse OpenSuse.Prelude

    An associative operation NOTE: This method is redundant and has the default implementation mappend = (<>) since base-4.11.0.0. Should it be implemented manually, since mappend is a synonym for (<>), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid.

  3. mappend :: Monoid a => a -> a -> a

    distribution-opensuse OpenSuse.Prelude

    An associative operation NOTE: This method is redundant and has the default implementation mappend = (<>) since base-4.11.0.0. Should it be implemented manually, since mappend is a synonym for (<>), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid.

  4. mappend :: Monoid a => a -> a -> a

    faktory Faktory.Prelude

    An associative operation NOTE: This method is redundant and has the default implementation mappend = (<>) since base-4.11.0.0. Should it be implemented manually, since mappend is a synonym for (<>), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid.

  5. mapM :: (IsStream t, MonadAsync m) => (a -> m b) -> t m a -> t m b

    streamly Streamly.Prelude

    mapM f = sequence . map f
    
    Apply a monadic function to each element of the stream and replace it with the output of the resulting action.
    >>> drain $ Stream.mapM putStr $ Stream.fromList ["a", "b", "c"]
    abc
    
    >>> :{
    drain $ Stream.replicateM 10 (return 1)
    & (fromSerial . Stream.mapM (x -> threadDelay 1000000 >> print x))
    :}
    1
    ...
    1
    
    > drain $ Stream.replicateM 10 (return 1)
    & (fromAsync . Stream.mapM (x -> threadDelay 1000000 >> print x))
    
    Concurrent (do not use with fromParallel on infinite streams)

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

    streamly Streamly.Prelude

    mapM_ = Stream.drain . Stream.mapM
    
    Apply a monadic action to each element of the stream and discard the output of the action. This is not really a pure transformation operation but a transformation followed by fold.

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

    streamly Streamly.Prelude

    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.map fromJust . Stream.filter isJust . Stream.map f
    

  8. mapMaybeM :: (IsStream t, MonadAsync m, Functor (t m)) => (a -> m (Maybe b)) -> t m a -> t m b

    streamly Streamly.Prelude

    Like mapMaybe but maps a monadic function. Equivalent to:

    mapMaybeM f = Stream.map fromJust . Stream.filter isJust . Stream.mapM f
    
    Concurrent (do not use with fromParallel on infinite streams)

  9. mapEither :: (SumToProduct f r t, Object r a, ObjectSum r b c, Object t (f a), ObjectPair t (f b) (f c)) => r a (b + c) -> t (f a) (f b, f c)

    constrained-categories Control.Category.Constrained.Prelude

    mapEither f ≡ sum2product . fmap f
    
    

  10. mapM :: (Traversable s t k l, k ~ l, s ~ t, Applicative m k k, Object k a, Object k (t a), ObjectPair k b (t b), ObjectPair k (m b) (m (t b)), TraversalObject k t b) => k a (m b) -> k (t a) (m (t b))

    constrained-categories Control.Category.Constrained.Prelude

    traverse, restricted to endofunctors. May be more efficient to implement.

Page 14 of many | Previous | Next