Skip to content

Instantly share code, notes, and snippets.

@joejag
Created October 13, 2014 13:52
Show Gist options
  • Save joejag/e3de3f99572a09b7659a to your computer and use it in GitHub Desktop.
Save joejag/e3de3f99572a09b7659a to your computer and use it in GitHub Desktop.
Clojure arity gotcha
(defn a [a b c] (println "thanks!")) ; => #'user/a
(try (/ 1 2) (catch Exception e (a 1 2))) ; => 1/2
(try (/ 1 0) (catch Exception e (a 1 2))) ; => ArityException Wrong number of args (2) passed to: user/a clojure.lang.AFn.throwArity (AFn.java:429)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment