mapAccumL package:monoid-subclasses

Equivalent to mapAccumL from Data.List when applied to a String, but preserves all non-character data.