
28 Jul
2004
28 Jul
'04
3:23 p.m.
Peter Simons
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. -kzm -- If I haven't seen further, it is by standing in the footprints of giants