
19 Nov
2009
19 Nov
'09
12:15 p.m.
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