kanru/cl-mustache — pull request #5 by wzrdsappr (2013-01-09 23:04:27+00:00)
Title: Allow rendering within a lambda

Hello kanru,

I've added the ability to (context sensitively) render text within a lambda, as shown in the example documentation at http://mustache.github.com/mustache.5.html. I wrote the code so it can also still handle lambdas that do not need the render function. If you think this will be useful for others, please integrate it into your master code so they can access it through Quicklisp.

With this change, the context lambdas can use either one parameter or two, as shown below.

```lisp
;; original supported lambda example
(lambda (text)
(format nil "Call ~A" text))

;; additional supported lambda example, for instance for use in a loop.
(lambda (text render)
(format nil "{{> ~A-partial}}" (funcall render text)))
```

Thanks,
Jonathan

SHA: 1ccf564df3bb1ba3bd8b684b2ab6541ce48f1c8c