Fork me on GitHub
#clojure
<
2021-01-24
>
hiredman01:01:52

It has been a long time since I last looked at core.match's internals, but I believe it has some protocols you could extend to Pattern, but of course that runs afoul of the "don't extend protocols you don't own to types you don't own" advice. The other issue is I don't believe Pattern has a way to get a list of names. Chouser recently shared a macro in a tweet for binding named matches. He had to parse the names out of the pattern himself.

borkdude10:01:24

yeah, I think :guard with re-find/matches etc might be more reliable.