Can a seq be thought of as a kind of a list of pointers to the original 
vector elements then? If so, then does an operation on a vector, (e.g. 
reverse), cause clojure to internally generate a seq of pointers to the 
original vector elements? In other words seqs seem to provide a layer of 
indirection to avoid the need to copy elements of the original collection?

On Saturday, 30 November 2013 21:31:34 UTC, Jim foo.bar wrote:
>
> On Sat, 30 Nov 2013 13:15:33 -0800 (PST) 
> Andy Smith <the4th...@googlemail.com <javascript:>> wrote: 
>
> > but 
> > my question is really about the more general case of any function 
> > that manipulates a vector e.g. the following also returns a list 
> > rather than a vector as desired, 
>
> In Clojure you rarely have to worry about types. All the 
> data-structures fall under a common set of abstractions and in 
> particular the ISeq interface. Strictly speaking map returns a seq not 
> a list. In fact a lazy seq...this is by design so further operations 
> can be applied lazily later...if you use eager operations like mapv 
> exclusively you lose the ability to aggregate operations without cost. 
> hope that clarifies it... 
>
>
> Jim 
>

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