Created
July 16, 2020 18:02
-
-
Save DeLaGuardo/548b6d0eee2c2d29e308d7ffc2c9d43c to your computer and use it in GitHub Desktop.
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
(defmulti foo (fn [x & _] x)) | |
(defmethod foo :sum [_ & args] (apply + args)) | |
(apply foo (list* :sum (range 10))) ;; => ok | |
(apply foo (list* :sum (range 25))) ;; => Invalid arity exception |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment