@@ -265,8 +265,7 @@ foldrT f z s = D.foldrT f z (toStreamD s)
265265-- >>> Stream.fold Fold.drain $ Stream.mapM putStr s
266266-- abc
267267--
268−-- /Pre-release/
269−--
268+-- @since 0.9.0
270269{-# INLINE mapM #-}
271270mapM :: Monad m => (a -> m b) -> Stream m a -> Stream m b
272271mapM f m = fromStreamK $ D.toStreamK $ D.mapM f $ toStreamD m
@@ -281,6 +280,7 @@ mapM f m = fromStreamK $ D.toStreamK $ D.mapM f $ toStreamD m
281280-- >>> Stream.fold Fold.drain $ Stream.sequence s
282281-- abc
283282--
283+-- @since 0.9.0
284284{-# INLINE sequence #-}
285285sequence :: Monad m => Stream m (m a) -> Stream m a
286286sequence = mapM id
@@ -307,6 +307,7 @@ sequence = mapM id
307307--
308308-- Compare with 'trace'.
309309--
310+-- @since 0.9.0
310311{-# INLINE tap #-}
311312tap :: Monad m => FL.Fold m a b -> Stream m a -> Stream m a
312313tap f xs = fromStreamD $ D.tap f (toStreamD xs)
@@ -363,6 +364,7 @@ trace_ eff = fromStreamD . D.mapM (\x -> eff >> return x) . toStreamD
363364--
364365-- See also: 'usingStateT'
365366--
367+-- @since 0.9.0
366368
367369-- EXPLANATION:
368370-- >>> scanl' step z = Stream.scan (Fold.foldl' step z)
@@ -407,6 +409,7 @@ trace_ eff = fromStreamD . D.mapM (\x -> eff >> return x) . toStreamD
407409-- lazy expressions inside the accumulator, it is recommended that a strict
408410-- data structure is used for accumulator.
409411--
412+-- @since 0.9.0
410413{-# INLINE scan #-}
411414scan :: Monad m => Fold m a b -> Stream m a -> Stream m b
412415scan fld m = fromStreamD $ D.scanOnce fld $ toStreamD m
@@ -414,7 +417,7 @@ scan fld m = fromStreamD $ D.scanOnce fld $ toStreamD m
414417-- | Like 'scan' but restarts scanning afresh when the scanning fold
415418-- terminates.
416419--
417−-- /Pre-release/
420+-- @since 0.9.0
418421{-# INLINE scanMany #-}
419422scanMany :: Monad m => Fold m a b -> Stream m a -> Stream m b
420423scanMany fld m = fromStreamD $ D.scanMany fld $ toStreamD m
@@ -444,6 +447,7 @@ with f comb g = fmap snd . comb g . f
444447-- >>> filter p = Stream.mapMaybe (\x -> if p x then Just x else Nothing)
445448-- >>> filter p = Stream.scanMaybe (Fold.filtering p)
446449--
450+-- @since 0.9.0
447451{-# INLINE filter #-}
448452filter :: Monad m => (a -> Bool) -> Stream m a -> Stream m a
449453-- filter p = scanMaybe (FL.filtering p)
@@ -454,6 +458,7 @@ filter p m = fromStreamD $ D.filter p $ toStreamD m
454458-- >>> f p x = p x >>= \r -> return $ if r then Just x else Nothing
455459-- >>> filterM p = Stream.mapMaybeM (f p)
456460--
461+-- @since 0.9.0
457462{-# INLINE filterM #-}
458463filterM :: Monad m => (a -> m Bool) -> Stream m a -> Stream m a
459464filterM p m = fromStreamD $ D.filterM p $ toStreamD m
@@ -493,6 +498,7 @@ uniqBy eq = catMaybes . rollingMap f
493498--
494499-- >>> uniq = Stream.uniqBy (==)
495500--
501+-- @since 0.9.0
496502{-# INLINE uniq #-}
497503uniq :: (Eq a, Monad m) => Stream m a -> Stream m a
498504-- uniq = scanMaybe FL.uniq
@@ -539,6 +545,7 @@ repeated = undefined
539545-- >>> Stream.fold Fold.toList $ Stream.deleteBy (==) 3 input
540546-- [1,3,5]
541547--
548+-- @since 0.9.0
542549{-# INLINE deleteBy #-}
543550deleteBy :: Monad m => (a -> a -> Bool) -> a -> Stream m a -> Stream m a
544551-- deleteBy cmp x = scanMaybe (FL.deleteBy cmp x)
@@ -550,6 +557,7 @@ deleteBy cmp x m = fromStreamD $ D.deleteBy cmp x (toStreamD m)
550557
551558-- | Same as 'takeWhile' but with a monadic predicate.
552559--
560+-- @since 0.9.0
553561{-# INLINE takeWhileM #-}
554562takeWhileM :: Monad m => (a -> m Bool) -> Stream m a -> Stream m a
555563-- takeWhileM p = scanMaybe (FL.takingEndByM_ (\x -> not <$> p x))
@@ -558,6 +566,7 @@ takeWhileM p m = fromStreamD $ D.takeWhileM p $ toStreamD m
558566-- | Drop elements in the stream as long as the predicate succeeds and then
559567-- take the rest of the stream.
560568--
569+-- @since 0.9.0
561570{-# INLINE dropWhile #-}
562571dropWhile :: Monad m => (a -> Bool) -> Stream m a -> Stream m a
563572-- dropWhile p = scanMaybe (FL.droppingWhile p)
@@ -565,6 +574,7 @@ dropWhile p m = fromStreamD $ D.dropWhile p $ toStreamD m
565574
566575-- | Same as 'dropWhile' but with a monadic predicate.
567576--
577+-- @since 0.9.0
568578{-# INLINE dropWhileM #-}
569579dropWhileM :: Monad m => (a -> m Bool) -> Stream m a -> Stream m a
570580-- dropWhileM p = scanMaybe (FL.droppingWhileM p)
@@ -583,6 +593,7 @@ dropWhileM p m = fromStreamD $ D.dropWhileM p $ toStreamD m
583593-- >>> Stream.fold Fold.toList $ Stream.insertBy compare 2 input
584594-- [1,2,3,5]
585595--
596+-- @since 0.9.0
586597{-# INLINE insertBy #-}
587598insertBy ::Monad m => (a -> a -> Ordering) -> a -> Stream m a -> Stream m a
588599insertBy cmp x m = fromStreamD $ D.insertBy cmp x (toStreamD m)
@@ -593,6 +604,7 @@ insertBy cmp x m = fromStreamD $ D.insertBy cmp x (toStreamD m)
593604-- >>> Stream.fold Fold.toList $ Stream.intersperse ',' input
594605-- "h,e,l,l,o"
595606--
607+-- @since 0.9.0
596608{-# INLINE intersperse #-}
597609intersperse :: Monad m => a -> Stream m a -> Stream m a
598610intersperse a = fromStreamD . D.intersperse a . toStreamD
@@ -691,6 +703,7 @@ interspersePrefix_ m = mapM (\x -> void m >> return x)
691703-- >>> sleep n = liftIO $ threadDelay $ round $ n * 1000000
692704-- >>> delay n = Stream.intersperseM_ $ sleep n
693705--
706+-- @since 0.9.0
694707{-# INLINE delay #-}
695708delay :: MonadIO m => Double -> Stream m a -> Stream m a
696709delay n = intersperseM_ $ liftIO $ threadDelay $ round $ n * 1000000
@@ -758,6 +771,7 @@ reassembleBy = undefined
758771-- >>> Stream.fold Fold.toList $ Stream.indexed $ Stream.fromList "hello"
759772-- [(0,'h'),(1,'e'),(2,'l'),(3,'l'),(4,'o')]
760773--
774+-- @since 0.9.0
761775{-# INLINE indexed #-}
762776indexed :: Monad m => Stream m a -> Stream m (Int, a)
763777-- indexed = scanMaybe FL.indexing
@@ -776,6 +790,7 @@ indexed = fromStreamD . D.indexed . toStreamD
776790-- >>> Stream.fold Fold.toList $ Stream.indexedR 10 $ Stream.fromList "hello"
777791-- [(10,'h'),(9,'e'),(8,'l'),(7,'l'),(6,'o')]
778792--
793+-- @since 0.9.0
779794{-# INLINE indexedR #-}
780795indexedR :: Monad m => Int -> Stream m a -> Stream m (Int, a)
781796-- indexedR n = scanMaybe (FL.indexingRev n)
@@ -790,6 +805,7 @@ indexedR n = fromStreamD . D.indexedR n . toStreamD
790805--
791806-- >>> elemIndices a = Stream.findIndices (== a)
792807--
808+-- @since 0.9.0
793809{-# INLINE elemIndices #-}
794810elemIndices :: (Monad m, Eq a) => a -> Stream m a -> Stream m Int
795811elemIndices a = findIndices (== a)
@@ -844,6 +860,7 @@ rollingMap2 f m = fromStreamD $ D.rollingMap2 f $ toStreamD m
844860--
845861-- >>> mapMaybe f = Stream.catMaybes . fmap f
846862--
863+-- @since 0.9.0
847864{-# INLINE mapMaybe #-}
848865mapMaybe :: Monad m => (a -> Maybe b) -> Stream m a -> Stream m b
849866mapMaybe f m = fromStreamD $ D.mapMaybe f $ toStreamD m
@@ -856,6 +873,7 @@ mapMaybe f m = fromStreamD $ D.mapMaybe f $ toStreamD m
856873--
857874-- >>> mapM f = Stream.mapMaybeM (\x -> Just <$> f x)
858875--
876+-- @since 0.9.0
859877{-# INLINE_EARLY mapMaybeM #-}
860878mapMaybeM :: Monad m
861879 => (a -> m (Maybe b)) -> Stream m a -> Stream m b