Clojure: Doc Lookup, Find Function

By Xah Lee. Date:

This page shows you how to use Clojure help system for reading documentation offline, and how to find functions.

Show Inline Doc of a Function

To get the inline doc of a function, start REPL and call the doc function.

(doc list) ; show doc of the symbol “list”

Here's a sample output:

user=> (doc list)
([& items])
  Creates a new list containing the items.

Finding Function

To list all functions that contains a string/regex in their names, use “apropos”.

◆ clojure
Clojure 1.8.0
user=> (apropos "list")
(clojure.core/list clojure.core/list* clojure.core/list?)

To search a string/regex in all inline doc, use find-doc.

(find-doc "list")

Using Emacs CIDER

If you are using emacs CIDER, you can call cider-docCtrl+c Ctrl+d Ctrl+d】 to lookup doc of the fuction under cursor.

There are many functions for looking up doc or finding function:

[see Emacs: Clojure CIDER Tutorial]

Download Clojure Cheatsheet Offline