You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the contents of a file and wish to apply one regex to the first line and another regex to each of the other lines. This runs fast:
case lines contents of
[] -> []
h:b -> (:) <$> match hregex h <*> traverse (match bregex) b
This runs slow:
zipWithM match (hregex : repeat bregex) $ lines contents
That's sort of a shame. Just as I'm writing this, I'm realising that the first is probably faster because reductions can be applied to match bregex just once. Still, I'd be interested to hear your thoughts.
The text was updated successfully, but these errors were encountered:
I have the contents of a file and wish to apply one regex to the first line and another regex to each of the other lines. This runs fast:
This runs slow:
That's sort of a shame. Just as I'm writing this, I'm realising that the first is probably faster because reductions can be applied to
match bregex
just once. Still, I'd be interested to hear your thoughts.The text was updated successfully, but these errors were encountered: