Created
February 21, 2014 16:47
-
-
Save shepmaster/9137965 to your computer and use it in GitHub Desktop.
record calling its own protocol functions
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
(defprotocol Foo | |
(alpha [this a]) | |
(beta [this a])) | |
(defrecord Bar [] | |
Foo | |
(alpha [_ a] | |
(inc a)) | |
(beta [this a] | |
(inc (alpha this a)))) | |
(beta (->Bar) 5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment