29 Jul
2004
29 Jul
'04
3:23 a.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