I have the following code:
(def intArr (make-array Integer 10))

(for [i (range 10)]
  (aset intArr i (int 0)))
(for [i (range 10000)]
  (let [index (rand-int 10)]
    (aset intArr index (int (inc (aget intArr index))))))
(for [i (range 10)]
  (println (aget intArr i)))


I need to use
    (int 0)
and
    (int (inc (aget intArr index)))

Because of the class of those values is Long. Why are those not Integer?

-- 
Cecil Westerhof

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to