10
是否有一個內置的功能打印清單的項目,而不頂級括號,或者會有寫Clojure打印沒有括號的列表?
(defn println-list
"Prints a list without top-level parentheses, with a newline at the end"
[alist]
(doseq [item alist]
(print (str item " ")))
(print "\n"))
得到的
user=> (println-list '(1 2 3 4))
1 2 3 4
nil