Skip to content

Instantly share code, notes, and snippets.

@shepmaster
Created February 21, 2014 16:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shepmaster/9137965 to your computer and use it in GitHub Desktop.
Save shepmaster/9137965 to your computer and use it in GitHub Desktop.
record calling its own protocol functions
(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