scanl -containers +text

scanl :: (Char -> Char -> Char) -> Char -> Text -> Text
text Data.Text, text Data.Text.Lazy
O(n) scanl is similar to foldl, but returns a list of successive reduced values from the left. Subject to fusion. Performs replacement on invalid scalar values. > scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...] Note that > last (scanl f z xs) == foldl f z xs.
scanl1 :: (Char -> Char -> Char) -> Text -> Text
text Data.Text, text Data.Text.Lazy
O(n) scanl1 is a variant of scanl that has no starting value argument. Subject to fusion. Performs replacement on invalid scalar values. > scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]