On Fri, Jul 29, 2011 at 6:57 AM, Sam Aaron <samaa...@gmail.com> wrote: > However, something like the following doesn't work: > > (defn binding-vec [foos] > `(vec (interleave ~names ~(take (count names) (repeat '`(count ~foos)))))) > > A, because the above code is probably incorrect (I just cobbled it together > for the example) and more importantly: > B, because the code doesn't return a vec, it returns code that returns a vec. > > I really seem to be getting my brain in a knot over this. :-( Any > illumination would be really appreciated
Why not just (vec (interleave names (take (count names) (repeat `(count ~foos)))))? Of course I assume you eventually want something more complex than just (count foos) as the value for every variable, or why have more than one variable? -- 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