@@ -793,6 +793,7 @@ scanlM' step begin m = fromStreamD $ D.scanlM' step begin $ toStreamD m
793-- lazy expressions inside the accumulator, it is recommended that a strict
793-- lazy expressions inside the accumulator, it is recommended that a strict
794-- data structure is used for accumulator.
794-- data structure is used for accumulator.
796+-- >>> scanl' step z = scan (Fold.foldl' step z)
796-- >>> scanl' f z xs = scanlM' (\a b -> return (f a b)) (return z) xs
797-- >>> scanl' f z xs = scanlM' (\a b -> return (f a b)) (return z) xs
797-- >>> scanl' f z xs = z `Stream.cons` postscanl' f z xs
798-- >>> scanl' f z xs = z `Stream.cons` postscanl' f z xs
@@ -805,6 +806,7 @@ scanl' step z m = fromStreamS $ S.scanl' step z $ toStreamS m
806-- | Like 'scanl'' but does not stream the initial value of the accumulator.
807-- | Like 'scanl'' but does not stream the initial value of the accumulator.
809+-- >>> postscanl' step z = postscan (Fold.foldl' step z)
808-- >>> postscanl' f z = postscanlM' (\a b -> return (f a b)) (return z)
810-- >>> postscanl' f z = postscanlM' (\a b -> return (f a b)) (return z)
809-- >>> postscanl' f z xs = Stream.drop 1 $ Stream.scanl' f z xs
811-- >>> postscanl' f z xs = Stream.drop 1 $ Stream.scanl' f z xs