Skip to content

Instantly share code, notes, and snippets.

@tomjack
Created June 15, 2010 06:48
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 tomjack/79e5aea51bea774ed4b1 to your computer and use it in GitHub Desktop.
Save tomjack/79e5aea51bea774ed4b1 to your computer and use it in GitHub Desktop.
user> (deftype Foo [bar]
clojure.lang.IFn
(invoke [foo x] (+ bar x)))
user.Foo
user> (let [a (Foo. 3)] (a 4))
7
user> (let [a (Foo. 3)] (a 5))
8
user>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment