The following table categories Clojure functions, macros and special forms.
Category | Functions/Macros |
---|---|
arrays - general | aclone aget alength amap areduce aset into-array make-array to-array to-array-2d |
arrays - type-specific | aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short double-array float-array int-array long-array |
bindings | binding declare def defonce if-let let with-local-vars |
bitwise operations | bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor |
Clojure code access | load load-file load-reader load-string loaded-libs require source use |
compiling | compile gen-class gen-interface |
conditional logic | cond condp if if-let when when-first when-let when-not |
conversions | bigdec bigint boolean byte char double float int long num short |
databases | resultset-seq (also see clojure.contrib.sql) |
exception handling | catch finally throw throw-if try |
functions | comp complement constantly declare defn defn- fn partial |
multimethods | defmethod defmulti prefer-method remove-method |
input/output | file-seq flush line-seq newline pr prn print printf println read read-line slurp with-open |
iteration | doseq dotimes for iterate loop/recur trampoline while |
Java interop. | . .. add-classpath bean comparator enumeration-seq import iterator-seq memfn new set! |
Java interop. - proxies | construct-proxy get-proxy-class proxy proxy-mappings proxy-super update-proxy |
list creation | list list* |
predicates - logical | and every? not not-any? not-every? or some |
predicates - relational | < <= = == > >= compare empty? false? identical? neg? nil? not= not-empty pos? true? zero? |
predicates - types | associative? class? coll? decimal? delay? float? fn? ifn? instance? integer? keyword? list? macro? map? number? ratio? reversible? seq? sequential? set? sorted? string? symbol? var? vector? |
predicates - other | distinct? even? odd? |
macros | definline defmacro macro? macroexpand macroexpand-1 |
map operations | array-map assoc assoc-in contains? dissoc find get hash-map key keys max-key merge merge-with min-key pmap select-keys sorted-map sorted-map-by update-in val vals zip-map |
math - general | + - * / dec inc max min quot rand rand-int rationalize rem with-precision |
math - unchecked | unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract |
metadata | meta with-meta |
namespaces | alias all-ns create-ns find-ns find-var in-ns namespace ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap refer refer-clojure remove-ns resolve the-ns use |
parallel operations (in clojure.parallel namespace) | pany par pdistinct pfilter-dupes pfilter-nils pmax pmin preduce psort psummary pvec |
quoting and unquoting (evaluating) | eval quote |
reflection | ancestors bases class doc find-doc instance? isa? ns-resolve parents special-symbol? supers |
reference types - all | set-validator |
reference types - agents | agent agent-errors await await-for clear-agent-errors send send-off shutdown-agents |
reference types - agents as watchers | add-watch add-watcher remove-watch |
reference types - atoms | atom compare-and-set! reset! swap! |
reference types - refs | alter commute dosync ref ref-set |
reference types - vars | alter-var-root def set! var var? var-get var-set |
regular expressions | re-find re-groups re-matcher re-matches re-pattern re-seq |
sequence operations to retrieve a single item | ffirst first fnext last nth peek second |
sequence operations to retrieve multiple items | butlast drop drop-last drop-while filter next nnext nthnext pop remove rest rseq rsubseq subseq take take-nth take-while |
sequence operations to do other things | apply cache-seq concat conj cons count cycle distinct doall dorun empty flatten fnseq iterate interleave interpose into lazy-cat lazy-cons map mapcat partition range repeat repeatedly replace replicate reverse seq seque sort sort-by split-at split-with tree-seq |
set operations in clojure.core namespace | disj hash-set set set? sorted-set |
set operations in clojure.set namespace | difference index intersection join map-invert project rename rename-keys select union |
string and character operations | char-escape-string char-name-string format pr-str print-str prn-str read-string str string? subs with-in-str with-out-str |
structs | accessor create-struct defstruct get-in struct struct-map |
testing | assert cast test |
threads and concurrency | agent-errors clear-agent-errors future future-call get-validator locking monitor-enter monitor-exit |
transactions and refs | alter commute deref dosync ensure ref sync |
trees (in clojure.zip namespace) | append-child branch? children down edit end? insert-child insert-left insert-right left lefts make-node next node path remove replace right rights root seq-zip up vector-zip xml-zip zipper |
type hierarchies | derive isa? make-hierarchy underive |
vector operations | get nth split-at split-with subvec vec vector vector? |
XML | parse (in clojure.xml namespace) xml-seq |
miscellaneous | -> comment delay delay? descendants do doto force gensym hash identity intern keyword name preduce reduce symbol time |
Copyright © 2009 Object Computing, Inc. All rights reserved.