[Haskell-cafe] Re: ANN: weighted-regexp-

Sjoerd Visscher sjoerd at w3future.com
Tue Jul 27 03:04:17 EDT 2010

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

More information about the Haskell-Cafe mailing list