Skip to content

Instantly share code, notes, and snippets.

@jordanlewis
Created December 28, 2012 04:19
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 jordanlewis/4394437 to your computer and use it in GitHub Desktop.
Save jordanlewis/4394437 to your computer and use it in GitHub Desktop.
(defprotocol IFoo
(foo [this x])
(bar [this x y]))
(deftype Foo [avec]
IFoo
(foo [this x] (.Foo (conj avec x)))
(bar [this x y]
(let [newfoo (foo this x)]
(.Foo (conj (.avec newfoo) y)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment