Ken, that'll result in the original vector back out again. (vec (take 3 (cycle [1 2 3]))) => [1 2 3].
I think you mean: (vec (take (* n (count xs)) (cycle xs)))) On Wed, Jul 13, 2011 at 5:13 PM, Ken Wesson <kwess...@gmail.com> wrote: > On Wed, Jul 13, 2011 at 11:21 AM, Bhinderwala, Shoeb > <sabhinderw...@wellington.com> wrote: > > Thanks Tamreen. Your solution will have to be wrapped in another vec > call. I > > will use Miekel’s: > > > > > > > > (reduce into [] (repeat n xs)). > > What about (vec (take n (cycle xs)))? > > -- > Protege: What is this seething mass of parentheses?! > Master: Your father's Lisp REPL. This is the language of a true > hacker. Not as clumsy or random as C++; a language for a more > civilized age. > > -- > 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