@@ -47,8 +47,10 @@ import qualified Streamly.Internal.Data.Stream.StreamD as D
47import qualified Streamly as S hiding (runStream)
47import qualified Streamly as S hiding (runStream)
48import qualified Streamly.Prelude as S
48import qualified Streamly.Prelude as S
49import qualified Streamly.Internal.Prelude as Internal
49import qualified Streamly.Internal.Prelude as Internal
50+import qualified Streamly.Internal.Data.Fold as FL
50import qualified Streamly.Internal.Data.Unfold as UF
51import qualified Streamly.Internal.Data.Unfold as UF
51import qualified Streamly.Internal.Data.Pipe as Pipe
52import qualified Streamly.Internal.Data.Pipe as Pipe
53+import qualified Streamly.Internal.Data.Stream.Parallel as Par
53value, maxValue, value2 :: Int
55value, maxValue, value2 :: Int
54#ifdef LINEAR_ASYNC
56#ifdef LINEAR_ASYNC
@@ -434,6 +436,14 @@ map n = composeN n $ S.map (+1)
434map' t n = composeN' n $ t . S.map (+1)
436map' t n = composeN' n $ t . S.map (+1)
435mapM t n = composeN' n $ t . S.mapM return
437mapM t n = composeN' n $ t . S.mapM return
440+tap :: MonadIO m => Int -> Stream m Int -> m ()
441+tap n = composeN n $ S.tap FL.sum
443+{-# INLINE tapAsyncS #-}
444+tapAsyncS :: S.MonadAsync m => Int -> Stream m Int -> m ()
445+tapAsyncS n = composeN n $ Par.tapAsync S.sum
437{-# INLINE transformMapM #-}
447{-# INLINE transformMapM #-}
438{-# INLINE transformComposeMapM #-}
448{-# INLINE transformComposeMapM #-}
439{-# INLINE transformTeeMapM #-}
449{-# INLINE transformTeeMapM #-}