mapAccumL package:jsaddle

O(n) Like a combination of map and foldl'. Applies a function to each element of a JSString, passing an accumulating parameter from left to right, and returns a final JSString. Performs replacement on invalid scalar values.
O(n) Like a combination of map and foldl'. Applies a function to each element of a Text, passing an accumulating parameter from left to right, and returns a final JSString.