Thank you for your response, Marko.
I want to clarify one more thing:
(let [[t d] (split-with #(< % 12) (range 1e8))]
[(count d) (count t)])
does this mean that while (count d) is realizing (range 1e8) seq, it
becomes (also) realized within t, therefore
it doubles (range 1e8) in memory causing OOME while (count d) is still not
finished?
Also, you say "As *count* realizes one element after another, it doesn't on
its own retain a reference to the past elements."
Does this mean that, eg. in repl, when I do some (count xyz) and it
realizes xyz, It will later need to be reevaluated (realized again) if I
require xyz within repl (I presume that if I require xyz later within file,
it wont be GC due to it and clojure will know it shouldnt be GC)
--
--
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
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.