Prelude function suggestions
ketil+haskell at ii.uib.no
Wed Jul 28 15:23:33 EDT 2004
Peter Simons <simons at cryp.to> writes:
> Shooting from the hip, I'd say this more general function
> would do the trick:
> tokenize :: (a -> Bool) -> (a -> Bool) -> [a] -> [[a]]
And of course, I needed to split based on a function of the current
suffix, not individual characters.
breakWhere :: ([a] -> Bool) -> [a] -> [[a]]
Plenty of variations for this one, it seems.
If I haven't seen further, it is by standing in the footprints of giants
More information about the Libraries