clojure - New user, can not use contrib -
i new clojure , can not use clojure.contrib.math
. want exponentiation (power 2 3) --> 8
i have been looking morning solution have become more confused.
if try (use 'clojure.contrib.math)
file not found error. suspecting classpath issue tried resolve way, not able locate contrib jar...
then see contrib
perhaps deprecated.
so simple question, how access math functions?
clojure 1.5.1 leiningen 2.2.0
tahnks
yes, clojure.contrib has been deprecated. replacement clojure.contrib.math clojure.math.numeric-tower. need add dependency in project.clj file, per instructions in readme.
here's example particular function mentioned:
(clojure.math.numeric-tower/expt 2 3) ;=> 8
see where did clojure.contrib go document replacement libraries.
Comments
Post a Comment