刚刚开始使用clojure。我正在使用leiningen,但无法弄清楚为什么我的<<
宏导入似乎不起作用
项目.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" ]])
核心.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