Created
December 2, 2013 00:53
-
-
Save logaan/7743169 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
(ns defrecord-interop) | |
(defrecord Kitten [] | |
java.lang.Runnable | |
(run [this] (println "Kitten"))) | |
(deftype Puppy [] | |
java.lang.Runnable | |
(run [this] (println "Puppy"))) | |
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
import defrecord_interop.Kitten; | |
import defrecord_interop.Puppy; | |
class HelloWorldApp { | |
public static void main(String[] args) { | |
(new Kitten()).run(); | |
(new Puppy()).run(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment