10 Jul
2006
10 Jul
'06
3:54 p.m.
Marc Weber <marco-oweber@gmx.de> writes:
There is already lines. Why not generalise it to take an additional parameter '\n' and call it split or splitBy? There are some cases where you want to split a list not on '\n'.
Indeed, and in e.g. ByteString and MissingH, there are more functions of this kind. I find that I've needed split/break type functions of various kinds, and the standard functions don't seem to be too consistently named. I think it would be nice to have an orthogonal product of predicate types: () a a->Bool [a]->Bool (of increasing generality) and result types: ([a],[a]) and [[a]] (split one - split all). -k -- If I haven't seen further, it is by standing in the footprints of giants