Created
November 29, 2009 18:16
-
-
Save richhickey/244998 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
(reify | |
[ActionListener | |
(actionPerformed [this evt] ...)]) | |
(deftype ::MyType [a b c] | |
[SeqableProtocol | |
(seq-me [this] (blah a c))] | |
[IBarInterface | |
(.bar [this that] (fred b))]) | |
;above deftype becomes this when SeqbleProtocol has AOT-generated interface | |
(deftype ::MyType [a b c] | |
[my.ns.SeqableProtocol | |
(.seq_me [this] (blah a c))] | |
[IBarInterface | |
(.bar [this that] (fred b))]) | |
;or these when not | |
(deftype ::MyType [a b c] | |
[IBarInterface | |
(.bar [this that] (fred b))]) | |
;and | |
(extend-type ::MyType [a b c] | |
[SeqableProtocol | |
(seq-me [#^MyType__27 this] | |
(let [a (.a this) | |
b (.b this) | |
c (.c this)] | |
(blah a c)))]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment