Skip to content

Instantly share code, notes, and snippets.

@kindlychung kindlychung/array.clj Secret
Created May 7, 2015

What would you like to do?
(defn array-sum [^ints xs]
(loop [index 0 acc 0]
(if (< index (alength xs))
(recur (unchecked-inc index) (+ acc (aget xs index)))
(time (array-sum (into-array (range 400))))

This comment has been minimized.

Copy link
Owner Author

commented May 7, 2015

CompilerException java.lang.ClassCastException: [Ljava.lang.Long; cannot be cast to [I, compiling:(/Users/kaiyin/personal_config_bin_files/workspace/cina/src/cina/ref_types.clj:1:24)

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.