Chapter 5. How to Use Clojure Projects and Libraries
Over the past few chapters, you have grown strong in your Clojure knowledge. You now know the fundamentals of the language, how to shape and control code in a functional way, and how to interact with the real world. So far, we have been working with short code snippets in a stand-alone REPL. Now, we will start building a project with Clojure.
In this chapter, we are going to be creating a Clojure project using the Leiningen build tool. Along the way, we are going to learn about how to run Clojure programs and test them, as well as how to manage and use libraries in our project.
Because we are going to be working with files and a directory structure, you might be wondering: What editor do I use for Clojure?
Getting Set Up with a Clojure Editor
There are many different choices for editors today. The best one for you is quite a subjective decision. It is wise, however, to try not to learn too many things at once. Try to use an editor or plug-in that you already know. Later, after you become more comfortable with Clojure, experiment with other editors and see what you like best. Here are a few of the most common editors/plug-ins for Clojure: