Getting Started

Before you start writing code, it’s good to initialize a project directory on your file system. While there are a variety of build tools and editors for Clojure, all of them expect the root of the project directory to contain a definition of the project, to have a directory containing all of the source code, a directory containing all of the test code, and so on.

We won’t need all of those—for our purposes we just need a src directory that will hold a single file of source that matches its namespace:

 $ mkdir -p src/hangman

With that sorted out, create the default source file (src/hangman/core.clj) in your Clojure editor of choice. Add the namespace declaration:

 (ns hangman.core)

You should also ensure that you have a REPL running in the context of this project. The exact procedure for that will vary depending your editor, so we won’t provide instructions for that here. If you want a REPL at the command line, you can start one by running clj.

Now, you’re ready to start working on the application.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.162.201