Created
July 10, 2012 18:39
-
-
Save timvisher/3085419 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
(defn class* [a & _] | |
(class a)) | |
(defmulti write-hotfix class*) | |
(defmethod write-hotfix clojure.lang.Ref [memory-store hotfix] | |
(dosync | |
(ref-set memory-store (assoc @memory-store (:id hotfix) hotfix)))) | |
(write-hotfix (ref {}) {:id 1}) | |
;;; => | |
;; No method in multimethod 'write-hotfix' for dispatch value: clojure.lang.Ref@b2018c | |
;; [Thrown class java.lang.IllegalArgumentException] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment