当从lein run中执行这个函数时,程序按预期运行。但我正在尝试使用atom.io的proto-repl包,并在使用proto-repl调用函数时出现“CompilerException java.lang.RuntimeException: Unable to resolve symbol: can-vote in this context.”。
以下是我的函数:
(defn can-vote
[]
(println "Enter age: ")
(let [age (read-line)]
(let [new-age (read-string age)]
(if (< new-age 18) (println "Not old enough")))
(println "Yay! You can vote")))