Skip to content

Instantly share code, notes, and snippets.

@swannodette
Created April 5, 2011 17:08
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 swannodette/904024 to your computer and use it in GitHub Desktop.
Save swannodette/904024 to your computer and use it in GitHub Desktop.
(definterface Foo
(^long bar [^long a ^long b])
(^double bar [^double a ^double b]))
(deftype Baz []
Foo
(^long bar [this ^long a ^long b] (+ a b))
(^double bar [this ^double a ^double b] (- a b)))
(.bar (Baz.) (long 1) (long 2)) ;; 3
(.bar (Baz.) (double 1) (double 2)) ;; -1.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment