Created
October 13, 2014 13:52
-
-
Save joejag/e3de3f99572a09b7659a to your computer and use it in GitHub Desktop.
Clojure arity gotcha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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