into uses transient and persistent! for speed.  The fact that into can take a 
transient as input is an accidental consequence of that, I think.  Before into 
was changed to use transients internally, it could only take persistent data 
structures as input, and return a persistent data structure.

Andy

On Mar 20, 2012, at 10:32 AM, László Török wrote:

> Hi,
> 
> While implementing qsort with clojure for fun, I thought about using 
> transient vectors to speed up sorting vs the "naive" functional 
> implementation.
> 
> I need an into! version of into when joining two sorted subarrays and I was 
> wondering why there isn't one.
> 
> It seems that (source into) does in fact support a transient collection as 
> the first argument, however it calls persistent! on the result.
> 
> What was the rationale behind the decision? (Note: I'm not questioning it, 
> just interested.)
> Is there a particular reason why this feature remains undocumented? 
> 
> -- 
> László Török
> 
> 
> -- 
> 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 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

Reply via email to