Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Calling a declared macro results in "wrong number of args (-1)"
(declare fail)
(defn fail* [m]
(if (map? m)
(fail 1)
m))
(defmacro fail [m]
(if (map? m)
(fail* m)
m))
(fail* {:a 1}) ;; => Wrong number of args (1) passed to: fail
(fail {:a 1}) ;; => Wrong number of args (-1) passed to: fail
(fail 1) ;; => 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment