
27 Jul
2010
27 Jul
'10
3:04 a.m.
On Jul 27, 2010, at 7:09 AM, Sebastian Fischer wrote:
I find
eachOnce :: [RegExp c] -> RegExp c eachOnce = foldr alt noMatch . map (foldr seq_ eps) . permutations
even clearer but your version is *much* better as it uses nesting to combine all alternatives that start with the same regexp.
Yes, this was what I had at first too, but trying to match this on 8 items takes 2 seconds and 9 items already takes one minute. -- Sjoerd Visscher http://w3future.com