Not every ISeq is lazy. In this case the seq is not lazy but is backed by a 
mutable array, thus the mentioned behavior.

Jozef

On Wednesday, October 22, 2014 6:41:34 PM UTC+2, Fluid Dynamics wrote:
>
> On Wednesday, October 22, 2014 12:10:30 PM UTC-4, Ambrose 
> Bonnaire-Sergeant wrote:
>>
>> On Wed, Oct 22, 2014 at 9:32 AM, Fluid Dynamics <a209...@trbvm.com> 
>> wrote:
>>>
>>> and is guaranteed to always produce the same value for the same field.
>>>>
>>>
>>> Nope:
>>>
>>> => (def foo (int-array [1 2 2 5 9 3]))
>>> #'user/foo
>>> => (def bar (seq foo))
>>> #'user/bar
>>> => bar
>>> (1 2 2 5 9 3)
>>> => (aset foo 3 3)
>>> 3
>>> => bar
>>> (1 2 2 3 9 3)
>>>
>>>
>> What is happening here? (seq foo) certainly does not look like something 
>> that should extend ISeq from its behaviour.
>>
>
> => (instance? clojure.lang.ISeq bar)
> true
>
>

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