Created
September 20, 2011 14:27
-
-
Save stesla/1229236 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(ns proxy-test.core) | |
(defn make-foo [] | |
(proxy [Runnable] [] | |
(run [] | |
(println "foo" (class this))))) | |
(defn make-bar [] | |
(proxy [Runnable] [] | |
(run [] | |
(println "bar" (class this))))) | |
(defn -main [] | |
(.run (make-foo)) | |
(.run (make-bar))) | |
;; user> (proxy-test.core/-main) | |
;; foo proxy_test.core.proxy$java.lang.Object$Runnable$36fc6471 | |
;; bar proxy_test.core.proxy$java.lang.Object$Runnable$36fc6471 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment