Skip to content

Instantly share code, notes, and snippets.

@pjstadig
Created July 23, 2013 10:43
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 pjstadig/6061490 to your computer and use it in GitHub Desktop.
Save pjstadig/6061490 to your computer and use it in GitHub Desktop.
paul@jane:~/src/sybilant$ clojure
Clojure 1.5.1
user=> (set! *warn-on-reflection* true)
true
user=> (defn foo [] (byte-array [(byte 1) (byte 2)]))
#'user/foo
user=> (alength (foo))
Reflection warning, NO_SOURCE_PATH:3:1 - call to alength can't be resolved.
2
user=> (defn foo ^bytes [] (byte-array [(byte 1) (byte 2)]))
#'user/foo
user=> (alength (foo))
2
user=>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment