Ian Lynagh wrote:
>> breaks (',' ==) "123,456,,78" == ["123", "456", "", "78"]
I wrote:
> runs = groupBy . on (==)
> breaks p = filter (not . p . head) . runs p
Except that has slightly different semantics than Ian's:
breaks (',' ==) "123,456,,78" == ["123","456","78"]
-Yitz