A Brief Beginner's Guide To Clojure
← prev | next →     Top-level ToC     /docs-and-resources.html     (printable version)

1 The Main Clojure Docs

The Clojure website provides numerous reference articles on their Documentation page. There’s also has a great cheatsheet there (which includes a link at the bottom to enhanced cheatsheets with tooltips).

The clojure-doc.org site contains a number tutorials and other guides written and maintained by the Clojure community.

For API documentation (with user-submitted examples and comments), see ClojureDocs. (You can also find the API docs at http://clojure.github.com/.)

The Confluence wiki is an enterprise wiki + communication medium for core developers. It contains a number of useful and up-to-date pages.

2 Other Docs

A well-known (though now somewhat dated) tutorial is Clojure - Functional Programming for the JVM.

The Learn Clojure site contains a number of pointers to various docs, books, and other community resources.

The Clojure Programming wikibook along with its sister Learning Clojure are two sources of community-contributed documentation, but they no longer appear to be very actively maintained.

I also found this curated reading list of useful articles.

Also http://www.eddology.com/post/14592579289/busy-persons-clojure.

3 Built-in Docstrings

Clojure (like Python) supports docstrings. These are strings embedded in the source code of functions for the purpose of documenting them. You can interactively access the docstring (at the repl) for any function like so:

(doc func-name)

To see a listing of what’s available in a given library, use:

(dir the.namespace)

You can also search the docstrings using (find-doc #"search string"). Note that the string inside #"" is a regex.

4 The Source

You can see the source code for any Clojure function right at the repl, for example:

(source repeat)

5 Library Source

When searching for documentation on a given library, consider reading the source. Look in ~/.m2/repository for the jars. To open one up, you might do this:

mkdir ~/temp/foo
cp ~/.m2/repository/path/to/bar-1.0.0.jar ~/temp/foo
cd ~/temp/foo
jar xvf bar-1.0.0.jar

To generate docs from library source code, see Generating Docs from Libraries.

6 Example Code

For example code, you can always read the source code files of Clojure itself (download and look in clojure-i.j.k/src/clj/clojure). You might also look at contrib and 3rd-party libraries (see available libraries).

More examples:

7 Java Documentation

It will sometimes be useful to look up documentation on various Java standard classes. You could download and install the full Java API docs onto your own system (and will probably want to at some point), but for now you can access those docs at: http://docs.oracle.com/javase/7/docs/api/.

8 Other Websites

4clojure is a site that has you work through successively more difficult programming problems, solving them with Clojure.

9 Videos of Talks

There’s a Clojure youtube page containing various talks. See also:

A discussion between Rich Hickey and Brian Beckman.

10 Books

My current favorite Clojure book is Clojure Programming. There are a number of others though (in no particular order):