Just getting started with clojure. I'm using leiningen and can't figure out why my importing of the <<
macro doesn't seem to be working
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))")))
and when i do a lein run 3 7 2
I expect
The sum is: 12
However I get this (followed by a large stacktrace):
Exception in thread "main" java.lang.IllegalAccessError: << does not exist
Perhaps you need to use the clojure.core.strint namespace?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With