@@ -482,6 +482,15 @@ minimum t = S.minimum (stream t)
482-- -----------------------------------------------------------------------------
482-- -----------------------------------------------------------------------------
483-- * Building 'Text's
483-- * Building 'Text's
485+-- | /O(n)/ 'scanl' is similar to 'foldl', but returns a list of
486+-- successive reduced values from the left. This function is subject
489+-- > scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]
493+-- > last (scanl f z xs) == foldl f z xs.
485scanl :: (Char -> Char -> Char) -> Char -> Text -> Text
494scanl :: (Char -> Char -> Char) -> Char -> Text -> Text
486scanl f z t = unstream (S.scanl f z (stream t))
495scanl f z t = unstream (S.scanl f z (stream t))
487{-# INLINE scanl #-}
496{-# INLINE scanl #-}