metosin / malli

High-performance data-driven data specification library for Clojure/Script.
Eclipse Public License 2.0
1.46k stars 208 forks source link

Instrumenting external functions #840

Closed NoahTheDuke closed 1 year ago

NoahTheDuke commented 1 year ago

Hey friends,

Sometimes I want to add instrumentation to code I haven't written, such as clojure.core functions or a library that doesn't check its inputs as closely as I would hope. Currently, that's not possible because of the way m/=> is written. I think this should be possible, however, by calling name on the provided symbol and then using the namespace of the symbol (defaulting to *ns*) as the symbol.