On Nov 8, 7:33 pm, megabite <afo...@tibox.com.br> wrote: > I'm trying to use Math/sqrt using clojure 1.3.0 and lein but for some > reason I can't get it to work. > > What do I need to put in the project.clj file and what needs to go > into the (ns ...) statement in the core.clj file in order to get this > work? It should be fairly straightforward but there don't seem to be > any examples of this online. The only examples use [org.clojure/ > clojure-contrib "1.2.0"] which causes Maven to dump a bunch of errors.
java.lang.Math and all standard java library classes do not need any lein configuration to work; they're always available when you run clojure on a standard java runtime. in addition, all the java.lang.* classes are directly addressable without using imports. Here's a session using clojure 1.3 with nothing in the project.clj dependencies except org.clojure/clojure-1.3: user> (Math/sqrt 4) 2.0 If that doesn't work, please tell us what you're doing. ps: clojure-contrib 1.2 is not compatible with clojure 1.3 - don't try to mix them in your projects. -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en