foldl-transduce-0.4.6.0: Transducers for foldl folds.

Safe HaskellSafe
LanguageHaskell98

Control.Foldl.Transduce.Textual

Contents

Description

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

Synopsis

Splitters

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"],[""]]

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

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

Deprecated

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

Deprecated: use textualBreak instead