On Jul 6, 4:00 pm, Chouser <chou...@gmail.com> wrote: > On Mon, Jul 6, 2009 at 3:47 PM, Sean Devlin<francoisdev...@gmail.com> wrote: > > > I think your unquote is okay. ClojureQL does something similar. > > > However, my gut says this should be in a doseq, not a for statement. > > Could be totally wrong, tough. > > I think the OP is trying to build and return a list, not > trying to execute a series of operations. If I'm right, > then 'for' is better than 'doseq'.
[snip] > I can't think of any way in which it's dangerous. Is it > important to you that the symbol become fully-qualified? If > so, then what you've got is fine -- are you writing a macro? Yes, I am! I'm slowly getting my head back into lispyness by diving head-first into writing a macro. =) I'm working on something that will approximately do: (take-ordered [3 0 1 2] coll) -> (interleave (take-nth 4 (drop 3 coll)) (take-nth 4 coll) (take-nth 4 (drop 1 coll)) (take-nth 4 (drop 2 coll))) This is a "rearranging" lazy seq operation, and the vector provided for the "pick-list" is of variable length. So I'm trying to build up a variable-length list of take-nth and drop applications in the macro substitution. There probably is an easier way to do this just with a function. I looked at interleave in core.clj and was surprised to see it wasn't a macro. So I may be making a mountain out of a mole hill, but it's all part of the learning process, right? =) Thanks for the help guys... Mike --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---