If I join all the patterns with `|` I can search for the first occurrence of *any* pattern and then match against them all, but that's less efficient than the current implementation since we have to compile and match with the big, compound pattern in addition to matching with the supplied patterns.

I though about making each pattern a capture group - `(first-pattern)|(second-pattern)|(third-pattern)` - so I can just check which capture group got filled and only match against that pattern. The problem with this plan is that the patterns themselves contain capture groups which will mess my count. I can't really rely on the number of arguments in the handler here - I have no guarantee that the pattern doesn't contain more groups than the handler has arguments.