Skip to content

Instantly share code, notes, and snippets.

@stesla
Created September 20, 2011 14:27
Show Gist options
  • Save stesla/1229236 to your computer and use it in GitHub Desktop.
Save stesla/1229236 to your computer and use it in GitHub Desktop.
(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