on master help sign in
inline mapM
e4f3d16Harendra Kumar
src/Streamly/Prelude.hs+1
@@ -372,6 +372,7 @@ maximum m = go Nothing (toStream m)
372
372
373-- | Replace each element of the stream with the result of a monadic action
373-- | Replace each element of the stream with the result of a monadic action
374-- applied on the element.
374-- applied on the element.
375+{-# INLINE mapM #-}
375mapM :: (Streaming t, Monad m) => (a -> m b) -> t m a -> t m b
376mapM :: (Streaming t, Monad m) => (a -> m b) -> t m a -> t m b
376mapM f m = fromStream $ go (toStream m)
377mapM f m = fromStream $ go (toStream m)
377 where
378 where