Created
June 16, 2010 12:25
-
-
Save swannodette/440593 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn test-array [n] | |
(let [a (longs (make-array Long/TYPE n))] | |
(amap a i result | |
(aset result i (rand-int 2))))) | |
(test-array 100) ; No matching method found: aset [Thrown class java.lang.IllegalArgumentException] | |
(defn test-array [n] | |
(let [a (longs (make-array Long/TYPE n))] | |
(amap a i result | |
(aset result i (long (rand-int 2)))))) | |
(test-array 100) ; works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment