IllegalArgumentException Don't know how to create ISeq from: java.lang.Long clojure.lang.RT.seqFrom (RT.java:487)
执行以下代码时出现错误:
(defn phrase-length [phr]
(loop [n 0 b () s ()]
(if (= n (count phr))
(concat #(reduce + b) #(reduce + s))
(recur (inc n)
(cons (nth (nth (nth phr n) 1) 0) b)
(cons (nth (nth (nth phr n) 1) 1) s)))))
错误发生在concat
. 它必须是试图减少同时也连接的东西。