Common lisp 如何将列表传递给cl mustache?

Common lisp 如何将列表传递给cl mustache?,common-lisp,mustache,Common Lisp,Mustache,我正在尝试使用。按照文件中的示例,呈现原子变量效果良好: 但是,我不知道如何传递一个列表来多次渲染一个部分。该文件没有示例,我尝试的方法也不起作用。例如: (mustache:mustache-render-to-string "{{#dates}}{{year}}-{{month}}-{{day}} {{/dates}}" '((:dates . (((:year . "2012")

我正在尝试使用。按照文件中的示例,呈现原子变量效果良好:

但是,我不知道如何传递一个列表来多次渲染一个部分。该文件没有示例,我尝试的方法也不起作用。例如:

(mustache:mustache-render-to-string "{{#dates}}{{year}}-{{month}}-{{day}}
{{/dates}}" 
                                    '((:dates . (((:year . "2012")
                                                  (:month . "07")
                                                  (:day . "02"))
                                                 ((:year . "2013")
                                                  (:month . "08")
                                                  (:day . "03"))))))
"--
"

我不需要检查,但从文档中可以看出,数组似乎被视为CL数组,所以您可以尝试一下,看看它是否有效:

(mustache:mustache-render-to-string "{{#dates}}{{year}}-{{month}}-{{day}}{{/dates}}" 
                                    '((:dates . #( ((:year . "2012")
                                                    (:month . "07")
                                                    (:day . "02"))
                                                   ((:year . "2013")
                                                    (:month . "08")
                                                    (:day . "03"))))))
(即,参数列表的数组)

(mustache:mustache-render-to-string "{{#dates}}{{year}}-{{month}}-{{day}}{{/dates}}" 
                                    '((:dates . #( ((:year . "2012")
                                                    (:month . "07")
                                                    (:day . "02"))
                                                   ((:year . "2013")
                                                    (:month . "08")
                                                    (:day . "03"))))))