Hello! Fleet have parameters for sure :)
Creating template from string: (fleet [post] "<p><(post :body)></p>") returns function of single argument post. (fleet [post, comments] "<p><(post :body)> <(comments :count)></p>") returns function of two arguments post, comments. Creating multiple templates from dir: (fleet-ns 'tpl "some/template/dir") having that some/template/dir contain post.html.fleet will produce 3 similar functions tpl/post, tpl/post-html, tpl/post-html-fleet that has 2 arguments: post, data where data arg by default = post arg and both are by default = nil Latter case is very flexible and convenient: you can treat template post as: - function of one argument post - for usage like rails partials - function of one argument data - for general usage - function of two arguments: main arg post and 'additional' argument data - to combine both Producing 3 functions from one file allow you to have/use tpl/post-html and tpl/post-json templates and use simple tpl/post if only one really present. tpl/post-html-fleetthere is for additional disambiguation. -- 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