added :. "splices" to djula [and thus cl-terrace]

2 views
Skip to first unread message

nall...@gmail.com

unread,
Jul 17, 2008, 9:04:35 AM7/17/08
to cl-terrace
the keyword :. [aka :|.|, the one created by (intern "." :keyword)]
can now be used to "splice" a plist into the plist given to the
function returned by DJULA:COMPILE-TEMPLATE

so in `djula' terms

(funcall template :a 1 :b 2 :c 3 :d 4 :e 5)

can also be written as

(funcall template :a 1 :. '(:b 2 c 3) :d 4 :e 5)

and in `cl-terrace' terms

(render "/template.html" :a 1 :b 2 :c 3 :d 4 :e 5)

can now be written as

(let ((defaults1 (list :b 2 :c 3))
(defaults2 (list :d 4 :e 5)))
(render "/template.html" :a 1 :. defaults1 :. defaults2))
Reply all
Reply to author
Forward
0 new messages