Great. Thanks.

On Dec 17, 6:08 pm, Baishampayan Ghose <b.gh...@gmail.com> wrote:
> > 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.
>
> You can use either `apply` or `into` here -
>
> (apply vector :head (get-header))
>
> (into [:head] (get-header))
>
> Regards,
> BG
>
> --
> Baishampayan Ghose
> b.ghose at gmail.com

-- 
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

Reply via email to