Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 2.07 KB

File metadata and controls

41 lines (28 loc) · 2.07 KB

Mastering Clojure

This is the code repository for Mastering Clojure, published by Packt. It contains all the supporting project files necessary to work through the book from start to finish.

Instructions and Navigation

All of the code is organized into folders. Each folder starts with c followed by the chapter number. For example, src/m_clj/c1/recur.clj is a file from chapter 1, and spec/m_clj/c10/speclj.clj is one from chapter 10.

Similarly, each chapter will have many namespaces. Each namespace starts with m-clj.c followed by the chapter number. For example, m-clj.c1.recur is a namespace from chapter 1.

Run the lein repl command and load the namespaces as follows.

$ lein repl
m-clj.core=> (load-file "src/m_clj/c1/recur.clj")
#'m-clj.c1-recur/factorial-ctco
m-clj.core=> (in-ns 'm-clj.c1.recur)
#<Namespace m-clj.c1-recur>
m-clj.c1-recur=> (fibo 10)

All of the ClojureScript examples can be run through web pages in the resources/html/ folder. Run lein cljsbuild once before you open these pages in a browser.

Related Clojure books

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781785889745