Documentation

doc find-doc
clojure.repl source

Primitives

Numbers

Arithmetic + - * / quot rem mod inc dec max min
Compare = == not= < > <= >=
Bitwise bit-{and, or, xor, not, flip, set, shift-right, shift-left, and-not, clear, test}
Cast byte short int long float double bigint bigdec num rationalize
Test nil? identical? zero? pos? neg? even? odd?
Random rand rand-int
BigInt with-precision
Unchecked unchecked-{add, dec, divide, inc, multiply, negate, remainder, subtract}

Strings

Create str print-str println-str pr-str prn-str with-out-str
Use count get subs format
Cast/Test char char? string?

Strings (clojure.string)

Test blank?
Letters capitalize lower-case upper-case
Use join escape split split-lines replace replace-first reverse
Trim trim trim-newline triml trimr

Other

Characters char char-name-string char-escape-string
Keywords keyword keyword?
Symbols symbol symbol? gensym

Collections

Collections

Generic ops count empty not-empty into conj
Content tests contains? distinct? empty? every? not-every? some not-any?
Capabilities sequential? associative? sorted? counted? reversible?
Type tests coll? seq? vector? list? map? set?

Lists

Create '() list list*
Stack peek pop
Examine first rest peek list?
'Change' cons conj

Vectors

Create [] vector vec vector-of
Examine get nth peek rseq vector?
'Change' assoc pop subvec replace conj

Sets

Create #{} hash-set sorted-set set conj disj
Examine get

Sets (clojure.set)

Rel. algebra join select project union difference intersection
Get map index rename-keys rename map-invert
Test subset? superset?

Maps

Create {} hash-map array-map zipmap sorted-map sorted-map-by bean frequencies
'Change' assoc assoc-in dissoc zipmap merge merge-with select-keys update-in
Examine get get-in contains? find keys vals map?
Entry key val
Sorted maps rseq subseq rsubseq

Zippers (clojure.zip)

Create zipper
Get zipper seq-zip vector-zip xml-zip
Get location up down left right leftmost rightmost
Get seq lefts rights path children
'Change' make-node replace edit insert-child insert-left insert-right append-child remove
Move next prev
Misc root node branch? end?

Printing

Print to *out* pr prn print printf println newline
Print to string pr-str prn-str print-str println-str with-out-str

Reader Macros

' Quote: 'form(quote form)
\ Character literal
; Single line comment
^ Meta: ^form(meta form)
@ Deref: @form(deref form)
` Syntax-quote
~ Unquote
~@ Unquote-splicing
#"p" Regex Pattern p
#^ Metadata
#' Var quote: #'x(var x)
#() #(...)(fn [args] (...))
#_ Ignore next form

Loading

Loading libs require use import refer
Listing loaded libs loaded-libs
Loading misc load load-file load-reader load-string