% Documentation and Resources % John Gabriele The Main Clojure Docs ===================== The [Clojure website](http://clojure.org/) provides numerous reference articles on [their Documentation page](http://clojure.org/reference/documentation). There's also a terrific [cheatsheet](http://clojure.org/api/cheatsheet) there (which includes a link at the top to [enhanced cheatsheets with tooltips](http://jafingerhut.github.com/)). More docs are listed on the [Clojure Community page](http://clojure.org/community/resources). For API documentation (with user-submitted examples and comments), see [ClojureDocs](http://clojuredocs.org/). The official API docs are at . Other Docs ========== * [Brave Clojure](http://www.braveclojure.com/) * (from Jan 2014) * * [Clojure Style Guide](https://github.com/bbatsov/clojure-style-guide) * [Clojure Doc Site](http://clojure-doc.org/) * [The Confluence wiki](http://dev.clojure.org/display/doc/Home) is an enterprise wiki + communication medium for core developers. It contains a number of useful pages. 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 docstrings (at the repl) like so: ~~~clojure (doc some-func) ; docstring for this function (doc some.namespace) ; docs for the namespace itself (doc some.namespace/some-func) ; using fully-qualified name ~~~ To see a listing of what's available in a given namespace, use: (dir the.namespace) You can also search the docstrings using `(find-doc #"search string")`. Note that the string inside `#""` is a regex. The Source ========== You can see the source code for any Clojure function right at the repl, for example: ~~~{.clojure} (source repeat) ~~~ 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: ~~~{.bash} mkdir ~/temp/some-src cp ~/.m2/repository/path/to/bar-1.0.0.jar ~/temp/some-src cd ~/temp/some-src jar xvf bar-1.0.0.jar ~~~ To generate docs from library source code, see [Generating Docs from Libraries](libs-generating-docs.html). Example Code ============ For example code, you can always read the source code files of Clojure itself ([download](http://clojure.org/downloads) and look in clojure-*i.j.k*/src/clj/clojure). You might also look at contrib and 3rd-party libraries (see [available libraries](libs-available.html)). More examples: * * * * The Clojure section at 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: . Other Websites, Videos, Books, etc. =================================== Explore .