I create a ref to an array:

(def r (ref (make-array Integer/TYPE 5)))

(type @r) -> [I

Then, I try to alter the array:

(dosync
  (alter r aset-int 0 9))

I would then expect to be able to write (aget @r 0) and get result of 9, 
but what actuall happens is that r becomes reference to java.lang.Long!

(type @r) -> java.lang.Long

What is wrong?

Piotr

-- 
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

Reply via email to