I am learning Clojure - it's a lot of fun! I am trying to use Incanter and Clojure Soup in the same file:
(require '[jsoup.soup :as soup])
(use '(incanter core stats io charts datasets))
And I get the following error:
CompilerException java.lang.IllegalStateException: $ already refers to: #'jsoup.soup/$ in namespace: user, compiling
I think I understand why, but how can I solve this problem? Appreciate this website and all the gurus on it!
Thanks.
If you only actually use one of the
$functions then you can exclude the other oneor you can take the approach of explicitly naming the vars you want to refer to in your namespace and explicitly calling the others by
namespace-alias/function, which would look more like this:The
usemethod of using other namespaces is discouraged in modern clojure code and has been subsumed by the refer form, so I use that form in these examples. It's also strongly encouraged to put the refer forms in the namespace declaration.