On Sat, Dec 17, 2011 at 06:06:50AM -0800, Razvan Rotaru wrote: > Hi, > > This may sound a bit weird, but can I "unquote-splice" something when > calling a macro. Here's an attempt to do this with hiccup: > > (defn get-header > [[:link {:type "text/css" ...}] > [:script {:type "text/javascript" ...}]]) > > (html [:head (get-header) ...] [:body ...]) > > > The result of get-header needs to "spliced" into the rest of the > structure for the html macro to work. > > Thanks, > Razvan
I've just used the list function to get around this in the past. So, something like this: (defn get-header (list [:link {:type "text/css" ...}] [:script {:type "text/javascript" ...}])) Robert -- 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