Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:4181529
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
(defn unresolvable-syms [form]
(let [usyms (atom #{})
_ (postwalk
#(do
(when (and (symbol? %) (nil? (resolve %)))
(swap! usyms conj %))
%) form)]
@usyms))
(defmacro exk [& args]
"[name? doc? attr-map? prepost-map? body]"
(let [{:keys [body] :as fn-decl} (args->fn-decl args)
_ (when-not (nil? (:args fn-decl))
(throw (Throwable. "exk takes no args.")))
(fnk*
(fn-decl->fnk-decl
(assoc fn-decl :args (vec (unresolvable-syms body)))))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.