@@ -47,8 +47,10 @@ import qualified Streamly.Internal.Data.Stream.StreamD as D
4747import qualified Streamly as S hiding (runStream)
4848import qualified Streamly.Prelude as S
4949import qualified Streamly.Internal.Prelude as Internal
50+import qualified Streamly.Internal.Data.Fold as FL
5051import qualified Streamly.Internal.Data.Unfold as UF
5152import qualified Streamly.Internal.Data.Pipe as Pipe
53+import qualified Streamly.Internal.Data.Stream.Parallel as Par
5254
5355value, maxValue, value2 :: Int
5456#ifdef LINEAR_ASYNC
@@ -434,6 +436,14 @@ map n = composeN n $ S.map (+1)
434436map' t n = composeN' n $ t . S.map (+1)
435437mapM t n = composeN' n $ t . S.mapM return
436438
439+{-# INLINE tap #-}
440+tap :: MonadIO m => Int -> Stream m Int -> m ()
441+tap n = composeN n $ S.tap FL.sum
442+
443+{-# INLINE tapAsyncS #-}
444+tapAsyncS :: S.MonadAsync m => Int -> Stream m Int -> m ()
445+tapAsyncS n = composeN n $ Par.tapAsync S.sum
446+
437447{-# INLINE transformMapM #-}
438448{-# INLINE transformComposeMapM #-}
439449{-# INLINE transformTeeMapM #-}