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.
mapMaybeM :: Monad m => (a -> m (Maybe b)) -> [a] -> m [b]distribution-opensuse OpenSuse.Prelude A version of mapMaybe that works with a monadic predicate.
mappend :: Monoid a => a -> a -> adistribution-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.
mappend :: Monoid a => a -> a -> adistribution-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.
mappend :: Monoid a => a -> a -> afaktory 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.
mapM :: (IsStream t, MonadAsync m) => (a -> m b) -> t m a -> t m bstreamly 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)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.-
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
mapMaybeM :: (IsStream t, MonadAsync m, Functor (t m)) => (a -> m (Maybe b)) -> t m a -> t m bstreamly 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)-
constrained-categories Control.Category.Constrained.Prelude mapEither f ≡ sum2product . fmap f
-
constrained-categories Control.Category.Constrained.Prelude traverse, restricted to endofunctors. May be more efficient to implement.