Skip to content

Instantly share code, notes, and snippets.

@cemerick
Created May 11, 2011 16:44
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 cemerick/a2247da58bf5a971d7e7 to your computer and use it in GitHub Desktop.
Save cemerick/a2247da58bf5a971d7e7 to your computer and use it in GitHub Desktop.
mixed_hinting.clj
=> (defn ^String foo
([])
(^long [a])
(^double [a b]))
#'user/foo
=> #(String. (foo))
#<user$eval2706$fn__2707 user$eval2706$fn__2707@1f96a21e>
=> #(String. (foo 0))
#<user$eval2710$fn__2711 user$eval2710$fn__2711@4595bfcd>
Reflection warning, NO_SOURCE_PATH:1 - call to java.lang.String ctor can't be resolved.
=> #(Long. (foo 0))
#<user$eval2720$fn__2721 user$eval2720$fn__2721@39a44220>
=> #(Long. (foo))
#<user$eval2724$fn__2725 user$eval2724$fn__2725@69a90deb>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment