有没有办法在没有unquote-splice
的情况下执行以下操作? map
返回向量列表。
(def base-html
`[:html
[:head ~@(map include-css ["css/reset.css"
"css/main.css"])]
[:body]])
=> [:html
[:head
[:link {:href "css/reset.css", :rel "stylesheet"}]
[:link {:href "css/main.css", :rel "stylesheet"}]]
[:body]]
答案 0 :(得分:0)
这样就够了吗?
(def base-html
[:html
(vec (cons :head (map include-css ["css/reset.css"
"css/main.css"])))
[:body]])