刚刚开始使用clojure。我正在使用leiningen并且无法弄清楚为什么导入<<
宏似乎不起作用
project.clj
(defproject myapp "0.1"
:description "Clojure learning sandbox"
:main myapp.core
:dependencies [[org.clojure/clojure "1.4.0"]
[org.clojure/core.incubator "0.1.2" ]])
core.clj
(ns clojure-shuffle
(:require [clojure.core.incubator :refer [<<]]))
(defn -main [& args]
(println (<< "The sum is: ~(reduce + (map read-string args))")))
当我做lein run 3 7 2
我希望
The sum is: 12
但是我得到了这个(接着是一个大的堆栈跟踪):
Exception in thread "main" java.lang.IllegalAccessError: << does not exist