Created
October 13, 2009 20:06
-
-
Save hiredman/209514 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 make-a (fn [& xs] (vec (cons (first xs) (map type (rest xs)))))) | |
(defmulti invoke-on (fn [obj name & xs] | |
(vec (cons (type obj) (cons name (map type xs)))))) | |
(defmethod make-a [::Object] [_] | |
(with-meta {} {:type ::Object})) | |
(defmethod invoke-on [::Object :to_s] [_ _] | |
"OBJECT_STRING") | |
(derive ::String ::Object) | |
;etc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment