(apply list the-seq) seems to work, but (list* the-seq), oddly, does not.

In most contexts, PersistentLists and seqs are interchangeable. Are you
needing to use the seq as a stack after constructing it in some manner that
produces a seq?



On Fri, Jun 21, 2013 at 8:37 AM, Jim - FooBar(); <jimpil1...@gmail.com>wrote:

> Hi all,
>
> what do you guys do when you want to map a fn over a list but you want to
> produce a list as the result (not vector or lazy-seq). What is the fastest
> way of doing this?
>
> My first attempt was this:
>
> (->> (mapv f coll)
>   rseq ;;reverse fast
>  (into '()))
>
> but I quickly realised that lists do not have transient counterparts.
> Therefore, the call to 'into' will be slow...in addition, I'm performing 2
> passes with this...
>
> any ideas?
>
> 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+unsubscribe@**googlegroups.com<clojure%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/**group/clojure?hl=en<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+unsubscribe@**googlegroups.com<clojure%2bunsubscr...@googlegroups.com>
> .
> For more options, visit 
> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
> .
>
>
>

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