On Wed, Mar 24, 2010 at 4:17 PM, Frank Siebenlist
<[email protected]> wrote:
> Thanks for the response - guess it is the best one can do living in this
> mixed mutable/immutable world.
>
> Has the seq'ed version of the java byte array become immutable or do we have
> to pray that nobody changes the underlying array values?
Pray.
(let [a (into-array (range 5)),
s (seq a)]
(prn s)
(aset a 1 42)
(prn s))
; (0 1 2 3 4)
; (0 42 2 3 4)
I'd recommend keeping the exposure of arrays to very small and
isolated pieces of code, if they must be used at all.
--Chouser
http://joyofclojure.com/
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
To unsubscribe from this group, send email to
clojure+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.