Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.