On 21/06/13 13:51, Cedric Greevey wrote:
(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?

No, my requirement is this:

I'm extending a protocol to all major Clojure data-structures very much in the same way conj is implemented. The protocol defines a single fn which simply maps a transformer on whatever collection was passed in. However, each polymorphic call should not mess with the types. It should always return the same type and do the mapping in the most efficient manner...

(apply list (map f the-seq)) does work but is not very efficient and I think you will get the results reversed...

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