This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
Is there a convenient way to compile patterns without resorting to something like
(defn compile-match
[pat]
(eval `(fn [~'x] (e/match ~'x ~pat true))))
?Can you use a strategy to dynamically compose the patterns? It not, check out meander interpreter. Not compiled and much slowe, but the interpreter does take data.
I don't really mind using eval, but I wouldn't do that with data coming over the wire
👍 1
Meander is definitely not optimized around patterns coming over the network. If you allow that, you are ultimately allowing arbitrary code. What we typically recommend is to use meander to write an interpreter/compiler for your own little pattern language.