Oh, I meant to devise a Data.List equivalent of the problem. The first of these loops unproductively for the same reason.
list1 ls = let (good, other) = break ("{-" `isPrefixOf`) ls (bad, rest) = break ("{-" `isPrefixOf`) other in good ++ list1 rest list2 ls = let (good, other) = break ("{-" `isPrefixOf`) ls (bad, rest) = break ("-}" `isSuffixOf`) other in case rest of [] -> good x:xs -> good ++ list2 xs -- You received this message because you are subscribed to the Google Groups "Haskell Pipes" group. To unsubscribe from this group and stop receiving emails from it, send an email to haskell-pipes+unsubscr...@googlegroups.com. To post to this group, send email to haskell-pipes@googlegroups.com.