为什么Clojure在编译为.jar时无法正常工作

时间:2018-11-27 10:59:35

标签: clojure leiningen lazy-sequences uberjar

根据此示例,它在REPL中可以正常工作,但是当将其编译为.jar(使用lein uberjar)并使用java -jar test.jar执行时,不会显示for循环的输出。问题是-怎么了?

(ns fortest.core
  (:gen-class))

(defn -main
  "I don't do a whole lot ... yet."
  [& args]
  (println "ala ma kota") ;this is shown in the output
  (for [x [1 2 3 4]] (println x))) ;this is not shown, why?

0 个答案:

没有答案