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

Popular posts from this blog

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -

R summary function in ddply (plyr) in a simple way -

c# - Are delegates created via lambda expressions guaranteed to be cached? -