@@ -713,6 +713,9 @@ scanlM' step begin m = fromStreamD $ D.scanlM' step begin $ toStreamD m
713-- lazy expressions inside the accumulator, it is recommended that a strict
713-- lazy expressions inside the accumulator, it is recommended that a strict
714-- data structure is used for accumulator.
714-- data structure is used for accumulator.
716+-- >>> scanl' f z xs = scanlM' (\a b -> return (f a b)) (return z) xs
717+-- >>> scanl' f z xs = z `Stream.cons` postscanl' f z xs
716-- See also: 'usingStateT'
719-- See also: 'usingStateT'
718-- @since 0.2.0
721-- @since 0.2.0
@@ -722,7 +725,8 @@ scanl' step z m = fromStreamS $ S.scanl' step z $ toStreamS m
723-- | Like 'scanl'' but does not stream the initial value of the accumulator.
726-- | Like 'scanl'' but does not stream the initial value of the accumulator.
728+-- >>> postscanl' f z = postscanlM' (\a b -> return (f a b)) (return z)
725−-- > postscanl' f z xs = Stream.drop 1 $ Stream.scanl' f z xs
729+-- >>> postscanl' f z xs = Stream.drop 1 $ Stream.scanl' f z xs
727-- @since 0.7.0
731-- @since 0.7.0
728{-# INLINE postscanl' #-}
732{-# INLINE postscanl' #-}