Hello, Maybe defroutes is not the right building-block to build upon if you want to make things more supple for you. Look up the building blocks defroutes is built upon,and if they are part of the public API, then maybe it's better (and easier) to build on them.
And note that a macro can only expand into a single final form, and cannot declare itself as "must be spliced in the calling form". so maybe you'd be better with trying to create a make-foos-routes. But this may not be the right level of granularity, again. 2010/5/7 Micah Martin <micahmar...@gmail.com>: > Hey all, > > I'm having trouble writing a macro and I hoping some one here can help. My > desired result is the following: > > (defroutes all-routes > (GET "/one" (foo "one")) > (GET "/two" (foo "two")) > (GET "/three" (foo "three"))) > > But I'd like to write it like so: > > (defroutes all-routes > (make-foos "one" "two" "three")) > > How do I write make-foos? Does if have to be a macro, or can it be a > function? > > Thanks, > > Micah > > -- > 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