Skip to content

Instantly share code, notes, and snippets.

@logaan
Created December 2, 2013 00:53
Show Gist options
  • Save logaan/7743169 to your computer and use it in GitHub Desktop.
Save logaan/7743169 to your computer and use it in GitHub Desktop.
(ns defrecord-interop)
(defrecord Kitten []
java.lang.Runnable
(run [this] (println "Kitten")))
(deftype Puppy []
java.lang.Runnable
(run [this] (println "Puppy")))
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