(defn get-expander
"Given a sym, a symbol identifying a macro, and env, an analysis environment
return the corresponding Clojure macroexpander."
[sym env]
(let [mvar (get-expander* sym env)]
(when (and (some? mvar)
#?(:clj (.isMacro ^clojure.lang.Var mvar)
:cljs ^boolean (.isMacro mvar)))
mvar)))