apply-template is used internal to the template namespace by the do-
template macro.  The do-template macro that allows you to apply some
code to groups of arguments.  In order to get what I think you're
after, use do-template in the following fashion:
(do-template (+ _1 _1) 2) --> (+ 2 2)

On Jul 21, 1:13 am, samppi <[email protected]> wrote:
> I've just discovered the clojure.templates library [1], and I'm
> wondering what's the difference between its function and that of
> regular functions:
>   (apply-template '[x] '(+ x x) '[2])
>   ((fn [x] (+ x x)) 2)
>
> [1]http://github.com/stuarthalloway/clojure/blob/6ee62ec1d88383e1caadb8b...

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to