Skip to content

@abp /gist:4181529
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
(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.