foldl-transduce-0.4.2.0: Transducers for foldl folds.

Safe HaskellSafe-Inferred
LanguageHaskell98

Control.Foldl.Transduce.Textual

Description

This module has transducers that work on Text and other text-like types.

Synopsis

Documentation

textualSplit :: TextualMonoid m => (Char -> Bool) -> Transducer m m () Source

>>> L.fold (folds (textualSplit (=='.')) L.list L.list) [".","bb.bb","c.c."]
[[""],["","bb"],["bb","c"],["c"],[""]]

textualSplitWhen :: TextualMonoid m => (Char -> Bool) -> Transducer m m () Source

>>> L.fold (bisect (textualSplitWhen (=='.')) (reify id) ignore L.list) ["aa","bb.bb","cc"]
["aa","bb"]