Hey guys,
I'm just curious why Christophe chose to return seq instead of a str
for Enlive for his template functions.
Example:
(deftemplate my-page-transformation "index.html" [message style]
[:style] (content style)
[:h1] (content message))
orchid> (my-page-transformation "my wonderful header" "h1 { color: blue }")
("<html>" "\n\t" "<head>" "\n\t\t" "<style>" "h1 { color: blue }"
"</style>" "\n\t" "</head>" "\n\t" "<body>" "\n\t\t" "<h1>" "test"
"</h1>" "\n\t" "</body>" "\n" "</html>")
It's trivial to call (apply str (my-page..)) but I'm just curious
about the thinking behind using a seq. Is it related to xml-seq and
traversing the tree?
Thanks,
Rob
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---