How do I start the REPL in a user defined namespace?
If you are using Leiningen to build your project, then add this to your project's project.clj
file:
(defproject test "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.2.1"]]
:main test.core)
In your src/test/core.clj
file, add this to create a test.core
namespace:
(ns test.core)
(defn -main [& args])
Next, build your project with Leiningen with lein compile
. Then enter lein repl
to invoke the REPL in your namespace. The REPL prompt will look like:
test.core=>
Nowadays is :repl-options {:init-ns foo.bar}
.
See https://github.com/technomancy/leiningen/blob/master/sample.project.clj