我很新的关闭,我不明白为什么我在运行时收到此错误消息。这里是我的代码:CompilerException java.lang.RuntimeException:在此上下文中无法解析符号:invert-helper
(defn invert [lst]
(if (empty? lst)
()
(cons (invert-helper lst) (invert (rest lst)))))
(defn invert-helper [lst]
(list (nth lst 1) (first lst)))
您需要在反转中使用它之前定义invert-helper。 – 2014-09-01 21:44:16