I'm pretty new, also. The Leiningen documentation that's easy to find has all of the information you need ... but it's not easy to sort out at first. Cedric Greevey gives the answer for standard libraries that usually come with Clojure. For others, I suggest:
Find the library name and version number that you want at clojars.org. Create a project directory with a command like: lein new app newdir Then edit newdir/project.clj: Add [libname-from-clojars.org "version number"] inside the outer pair of brackets [] after :dependencies, and save. Then change to the newdir directory and enter lein deps Then start the lein repl. Then follow Cedric's instructions. On Thursday, November 7, 2013 7:18:30 AM UTC-6, Starry SHI wrote: > > Hi, I am new to clojure and I find lein REPL very convenient to use. But I > have one question: in REPL, how to include functions defined in other > libraries and call them in my clojure code? > > For example, my code need to call square root function defined in > clojure.contrib.math (included in clojure-contrib.jar). Can anyone tell me > how to include this jar file from lein repl, so that my code can call sqrt > function? > > Thank you! > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.