On Jul 15, 1:54 pm, Jan Rychter <j...@rychter.com> wrote:
> I've been looking for a function that would take a seq and create a list
> (a real clojure.lang.PersistentList), but haven't found one. The closest
> I got was:
>
> (apply list my-seq)
>
> Essentially, I'm looking for something similar to (vec) that returns
> lists.
>
> --J.

Why would you want to do this? Seqs are nearly identical to lists (The
only difference I can think being that lists are Counted, while seqs
are not). If it's about forcing strictness, You can use 'doall.

However, if you really do need a PersistentList, then (apply list the-
seq) is what you need. The vec function is a shortcut for (apply
vector the-seq), provided in the standard library because vectorising
a seq is rather common.

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