On Jun 27, 2012, at 9:39 AM, Warren Lynn wrote: > I am surprised that there seems to be no general sub-sequence function that > will return a segment of a sequence without changing the underlying concrete > type. I found "subvec", but it works only on vectors. "subseq" is not what I > thought it is. Did I miss anything? Or is there a simple idiomatic way to do > it so there is no need for such a function? Thank you.
You can combine 'drop and 'drop-last to get a seq version of subvec (but lazy and O(n)). As for the issue of concrete types: in general, clojure's sequence functions return seqs, not instances of whatever concrete type you gave them. If you need a specific type, you normally just pour the result through 'into or one of the specific collection creation functions. -- 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