@@ -713,6 +713,9 @@ scanlM' step begin m = fromStreamD $ D.scanlM' step begin $ toStreamD m
713713-- lazy expressions inside the accumulator, it is recommended that a strict
714714-- data structure is used for accumulator.
715715--
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
718+--
716719-- See also: 'usingStateT'
717720--
718721-- @since 0.2.0
@@ -722,7 +725,8 @@ scanl' step z m = fromStreamS $ S.scanl' step z $ toStreamS m
722725
723726-- | Like 'scanl'' but does not stream the initial value of the accumulator.
724727--
725−-- > postscanl' f z xs = Stream.drop 1 $ Stream.scanl' f z xs
728+-- >>> postscanl' f z = postscanlM' (\a b -> return (f a b)) (return z)
729+-- >>> postscanl' f z xs = Stream.drop 1 $ Stream.scanl' f z xs
726730--
727731-- @since 0.7.0
728732{-# INLINE postscanl' #-}