Hi!

(I'm writing clojure-doc.org articles, so any help/corrections will help 
others too.)

Why is Clojure designed so that only vectors and `range` results are 
chunked (when you seq them), and not other things? Did someone profile 
Clojure programs, and these were the two hotspots? Or was it a matter of 
being conservative, and I/O is less likely in seqs based on vectors/ranges?


Thanks,
 Tj

PS: My assumptions (from grepping the code and reading Chas Emerick's 
explanation):

* Only non-empty vectors & `range` calls become chunked when you call
  seq. (Aside from, of course, user-defined chunked sequences.)

* Chunkiness is opt-in. Functions like map manually propagate
  chunking. Joy of Clojure's `seq1` turns off chunkiness because it
  enforces a seq based on lists.

-- 
-- 
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/groups/opt_out.

Reply via email to