Skip to main content

clojure.core

#

  • #""

    Regex literal. #"pattern" compiles to java.util.regex.Pattern at read time.

  • #'

    Var quote. #'foo resolves to the Var object itself.

  • #()

    Anonymous function shorthand. #(+ %1 %2) expands to (fn [x y] (+ x y)).

  • #?

    Reader conditional. #?(:clj expr :cljs expr) for .cljc files.

  • #?@

    Splicing reader conditional.

  • #_

    Discard. #_form causes the reader to ignore the next form.

  • #inst

    Tagged literal for instants. #inst "2024-01-01".

  • #uuid

    Tagged literal for UUIDs.

  • #{}

    Set literal. #{1 2 3} creates a persistent hash set.

'

  • '

    Quote. 'form expands to (quote form).

*

  • *

    Returns the product of nums. (*) returns 1. Does not auto-promote longs, will throw on overflow. See also: *'

  • *'

    Returns the product of nums. (*') returns 1. Supports arbitrary precision. See also: *

  • *1

    bound in a repl thread to the most recent value printed

  • *2

    bound in a repl thread to the second most recent value printed

  • *3

    bound in a repl thread to the third most recent value printed

  • *agent*

    The agent currently running an action on this thread, else nil

  • *assert*

    When set to logical false, 'assert' will omit assertion checks in compiled code. Defaults to true.

  • *clojure-version*

    The version info for Clojure core, as a map containing :major :minor :incremental and :qualifier keys. Feature releas...

  • *command-line-args*

    A sequence of the supplied command line arguments, or nil if none were supplied

  • *compile-files*

    Set to true when compiling files, false otherwise.

  • *compile-path*

    Specifies the directory where 'compile' will write out .class files. This directory must be in the classpath for 'comp...

  • *compiler-options*

    A map of keys to options. Note, when binding dynamically make sure to merge with previous value. Supported options: ...

  • *data-readers*

    Map from reader tag symbols to data reader Vars. When Clojure starts, it searches for files named 'data_readers.clj' ...

  • *default-data-reader-fn*

    When no data reader is found for a tag and *default-data-reader-fn* is non-nil, it will be called with two arguments, ...

  • *e

    bound in a repl thread to the most recent exception caught by the repl

  • *err*

    A java.io.Writer object representing standard error for print operations. Defaults to System/err, wrapped in a PrintW...

  • *file*

    The path of the file being evaluated, as a String. When there is no file, e.g. in the REPL, the value is not defined.

  • *flush-on-newline*

    When set to true, output will be flushed whenever a newline is printed. Defaults to true.

  • *in*

    A java.io.Reader object representing standard input for read operations. Defaults to System/in, wrapped in a LineNumb...

  • *ns*

    A clojure.lang.Namespace object representing the current namespace.

  • *out*

    A java.io.Writer object representing standard output for print operations. Defaults to System/out, wrapped in an Outp...

  • *print-dup*

    When set to logical true, objects will be printed in a way that preserves their type when read in later. Defaults t...

  • *print-length*

    *print-length* controls how many items of each collection the printer will print. If it is bound to logical false, the...

  • *print-level*

    *print-level* controls how many levels deep the printer will print nested objects. If it is bound to logical false, th...

  • *print-meta*

    If set to logical true, when printing an object, its metadata will also be printed in a form that can be read back by ...

  • *print-namespace-maps*

    *print-namespace-maps* controls whether the printer will print namespace map literal syntax. It defaults to false, but...

  • *print-readably*

    When set to logical false, strings and characters will be printed with non-alphanumeric characters converted to the ap...

  • *read-eval*

    Defaults to true (or value specified by system property, see below) ***This setting implies that the full power of the...

  • *repl*

    Bound to true in a repl thread

  • *unchecked-math*

    While bound to true, compilations of +, -, *, inc, dec and the coercions will be done without overflow checks. While b...

  • *warn-on-reflection*

    When set to true, the compiler will emit warnings when reflection is needed to resolve Java method calls or field acce...

+

  • +

    Returns the sum of nums. (+) returns 0. Does not auto-promote longs, will throw on overflow. See also: +'

  • +'

    Returns the sum of nums. (+') returns 0. Supports arbitrary precision. See also: +

-

  • -

    If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Does not auto-p...

  • -'

    If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Supports arbitr...

  • ->

    Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a...

  • ->>

    Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a ...

  • ->ArrayChunk

    Positional factory function for class clojure.core.ArrayChunk.

  • ->Eduction

    Positional factory function for class clojure.core.Eduction.

  • ->Vec

    Positional factory function for class clojure.core.Vec.

  • ->VecNode

    Positional factory function for class clojure.core.VecNode.

  • ->VecSeq

    Positional factory function for class clojure.core.VecSeq.

.

  • .

    Host interop: field access or method call.

  • ..

    form => fieldName-symbol or (instanceMethodName-symbol args*) Expands into a member access (.) of the first member on...

/

  • /

    If no denominators are supplied, returns 1/numerator, else returns numerator divided by all of the denominators.

<

  • <

    Returns non-nil if nums are in monotonically increasing order, otherwise false.

  • <=

    Returns non-nil if nums are in monotonically non-decreasing order, otherwise false.

=

  • =

    Equality. Returns true if x equals y, false if not. Same as Java x.equals(y) except it also works for nil, and compare...

  • ==

    Returns non-nil if nums all have the equivalent value (type-independent), otherwise false

>

  • >

    Returns non-nil if nums are in monotonically decreasing order, otherwise false.

  • >=

    Returns non-nil if nums are in monotonically non-increasing order, otherwise false.

@

  • @

    Deref. @ref expands to (deref ref).

A

  • abs

    Returns the absolute value of a. If a is Long/MIN_VALUE => Long/MIN_VALUE If a is a double and zero => +0.0 If a i...

  • accessor

    Returns a fn that, given an instance of a structmap with the basis, returns the value at the key. The key must be in ...

  • aclone

    Returns a clone of the Java array. Works on arrays of known types.

  • add-tap

    adds f, a fn of one argument, to the tap set. This function will be called with anything sent via tap>. This function ...

  • add-watch

    Adds a watch function to an agent/atom/var/ref reference. The watch fn must be a fn of 4 args: a key, the reference, i...

  • agent

    Creates and returns an agent with an initial value of state and zero or more options (in any order): :meta metadata...

  • agent-error

    Returns the exception thrown during an asynchronous action of the agent if the agent is failed. Returns nil if the ag...

  • aget

    Returns the value at the index/indices. Works on Java arrays of all types.

  • alength

    Returns the length of the Java array. Works on arrays of all types.

  • alias

    Add an alias in the current namespace to another namespace. Arguments are two symbols: the alias to be used, and the...

  • all-ns

    Returns a sequence of all namespaces.

  • alter

    Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref ar...

  • alter-meta!

    Atomically sets the metadata for a namespace/var/ref/agent/atom to be: (apply f its-current-meta args) f must be f...

  • alter-var-root

    Atomically alters the root binding of var v by applying f to its current value plus any args

  • amap

    Maps an expression across an array a, using an index named idx, and return value named ret, initialized to a clone of ...

  • ancestors

    Returns the immediate and indirect parents of tag, either via a Java type inheritance relationship or a relationship e...

  • and

    Evaluates exprs one at a time, from left to right. If a form returns logical false (nil or false), and returns that va...

  • any?

    Returns true given any argument.

  • apply

    Applies fn f to the argument list formed by prepending intervening arguments to args.

  • areduce

    Reduces an expression across an array a, using an index named idx, and return value named ret, initialized to init, se...

  • array-map

    Constructs an array-map. If any keys are equal, they are handled as if by repeated uses of assoc.

  • as->

    Binds name to expr, evaluates the first form in the lexical context of that binding, then binds name to that result, r...

  • aset

    Sets the value at the index/indices. Works on Java arrays of reference types. Returns val.

  • aset-boolean

    Sets the value at the index/indices. Works on arrays of boolean. Returns val.

  • aset-byte

    Sets the value at the index/indices. Works on arrays of byte. Returns val.

  • aset-char

    Sets the value at the index/indices. Works on arrays of char. Returns val.

  • aset-double

    Sets the value at the index/indices. Works on arrays of double. Returns val.

  • aset-float

    Sets the value at the index/indices. Works on arrays of float. Returns val.

  • aset-int

    Sets the value at the index/indices. Works on arrays of int. Returns val.

  • aset-long

    Sets the value at the index/indices. Works on arrays of long. Returns val.

  • aset-short

    Sets the value at the index/indices. Works on arrays of short. Returns val.

  • assert

    Evaluates expression x and throws an AssertionError with optional message if x does not evaluate to logical true. A...

  • assoc

    assoc[iate]. When applied to a map, returns a new map of the same (hashed/sorted) type, that contains the mapping of...

  • assoc!

    When applied to a transient map, adds mapping of key(s) to val(s). When applied to a transient vector, sets the val at...

  • assoc-in

    Associates a value in a nested associative structure, where ks is a sequence of keys and v is the new value and return...

  • associative?

    Returns true if coll implements Associative

  • atom

    Creates and returns an Atom with an initial value of x and zero or more options (in any order): :meta metadata-map ...

  • await

    Blocks the current thread (indefinitely!) until all actions dispatched thus far, from this thread or agent, to the age...

  • await-for

    Blocks the current thread until all actions dispatched thus far (from this thread or agent) to the agents have occurre...

B

  • bases

    Returns the immediate superclass and direct interfaces of c, if any

  • bean

    Takes a Java object and returns a read-only implementation of the map abstraction based upon its JavaBean properties.

  • bigdec

    Coerce to BigDecimal

  • bigint

    Coerce to BigInt

  • biginteger

    Coerce to BigInteger

  • binding

    binding => var-symbol init-expr Creates new bindings for the (already-existing) vars, with the supplied initial val...

  • bit-and

    Bitwise and

  • bit-and-not

    Bitwise and with complement

  • bit-clear

    Clear bit at index n

  • bit-flip

    Flip bit at index n

  • bit-not

    Bitwise complement

  • bit-or

    Bitwise or

  • bit-set

    Set bit at index n

  • bit-shift-left

    Bitwise shift left

  • bit-shift-right

    Bitwise shift right

  • bit-test

    Test bit at index n

  • bit-xor

    Bitwise exclusive or

  • boolean

    Coerce to boolean

  • boolean-array

    Creates an array of booleans

  • boolean?

    Return true if x is a Boolean

  • booleans

    Casts to boolean[]

  • bound-fn

    Returns a function defined by the given fntail, which will install the same bindings in effect as in the thread at the...

  • bound-fn*

    Returns a function, which will install the same bindings in effect as in the thread at the time bound-fn* was called a...

  • bound?

    Returns true if all of the vars provided as arguments have any bound value, root or thread-local. Implies that deref'...

  • bounded-count

    If coll is counted? returns its count, else will count at most the first n elements of coll using its seq

  • butlast

    Return a seq of all but the last item in coll, in linear time

  • byte

    Coerce to byte

  • byte-array

    Creates an array of bytes

  • bytes

    Casts to bytes[]

  • bytes?

    Return true if x is a byte array

C

  • case

    Takes an expression, and a set of clauses. Each clause can take the form of either: test-constant result-expr (...

  • cast

    Throws a ClassCastException if x is not a c, else returns x.

  • cat

    A transducer which concatenates the contents of each input, which must be a collection, into the reduction.

  • catch

    Catch clause inside try.

  • char

    Coerce to char

  • char-array

    Creates an array of chars

  • char-escape-string

    Returns escape string for char or nil if none

  • char-name-string

    Returns name string for char or nil if none

  • char?

    Return true if x is a Character

  • chars

    Casts to chars[]

  • class

    Returns the Class of x

  • class?

    Returns true if x is an instance of Class

  • clojure-version

    Returns clojure version as a printable string.

  • coll?

    Returns true if x implements IPersistentCollection

  • comment

    Ignores body, yields nil

  • commute

    Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref ar...

  • comp

    Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable numb...

  • comparator

    Returns an implementation of java.util.Comparator based upon pred.

  • compare

    Comparator. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'gre...

  • compare-and-set!

    Atomically sets the value of atom to newval if and only if the current value of the atom is identical to oldval. Retur...

  • compile

    Compiles the namespace named by the symbol lib into a set of classfiles. The source for the lib must be in a proper ...

  • complement

    Takes a fn f and returns a fn that takes the same arguments as f, has the same effects, if any, and returns the opposi...

  • completing

    Takes a reducing function f of 2 args and returns a fn suitable for transduce by adding an arity-1 signature that call...

  • concat

    Returns a lazy seq representing the concatenation of the elements in the supplied colls.

  • cond

    Takes a set of test/expr pairs. It evaluates each test one at a time. If a test returns logical true, cond evaluates ...

  • cond->

    Takes an expression and a set of test/form pairs. Threads expr (via ->) through each form for which the corresponding ...

  • cond->>

    Takes an expression and a set of test/form pairs. Threads expr (via ->>) through each form for which the corresponding...

  • condp

    Takes a binary predicate, an expression, and a set of clauses. Each clause can take the form of either: test-expr r...

  • conj

    conj[oin]. Returns a new collection with the xs 'added'. (conj nil item) returns (item). (conj coll) returns col...

  • conj!

    Adds x to the transient collection, and return coll. The 'addition' may happen at different 'places' depending on the ...

  • cons

    Returns a new seq where x is the first element and seq is the rest.

  • constantly

    Returns a function that takes any number of arguments and returns x.

  • construct-proxy

    Takes a proxy class and any arguments for its superclass ctor and creates and returns an instance of the proxy.

  • contains?

    Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed co...

  • count

    Returns the number of items in the collection. (count nil) returns 0. Also works on strings, arrays, and Java Collect...

  • counted?

    Returns true if coll implements count in constant time

  • create-ns

    Create a new namespace named by the symbol if one doesn't already exist, returns it or the already-existing namespace ...

  • create-struct

    Returns a structure basis object.

  • cycle

    Returns a lazy (infinite!) sequence of repetitions of the items in coll.

D

  • dec

    Returns a number one less than num. Does not auto-promote longs, will throw on overflow. See also: dec'

  • dec'

    Returns a number one less than num. Supports arbitrary precision. See also: dec

  • decimal?

    Returns true if n is a BigDecimal

  • declare

    defs the supplied var names with no bindings, useful for making forward declarations.

  • dedupe

    Returns a lazy sequence removing consecutive duplicates in coll. Returns a transducer when no collection is provided.

  • def

    Creates and interns a global var.

  • default-data-readers

    Default map of data reader functions provided by Clojure. May be overridden by binding *data-readers*.

  • definline

    Experimental - like defmacro, except defines a named function whose body is the expansion, calls to which may be expan...

  • definterface

    Creates a new Java interface with the given name and method sigs. The method return types and parameter types may be s...

  • defmacro

    Like defn, but the resulting function name is declared as a macro and will be used as a macro by the compiler when it ...

  • defmethod

    Creates and installs a new method of multimethod associated with dispatch-value.

  • defmulti

    Creates a new multimethod with the associated dispatch function. The docstring and attr-map are optional. Options a...

  • defn

    Same as (def name (fn [params* ] exprs*)) or (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added...

  • defn-

    same as defn, yielding non-public def

  • defonce

    defs name to have the root value of the expr iff the named var has no root value, else expr is unevaluated

  • defprotocol

    A protocol is a named set of named methods and their signatures: (defprotocol AProtocolName ;optional doc string ...

  • defrecord

    (defrecord name [fields*] options* specs*) Options are expressed as sequential keywords and arguments (in any order)...

  • defstruct

    Same as (def name (create-struct keys...))

  • deftype

    (deftype name [fields*] options* specs*) Options are expressed as sequential keywords and arguments (in any order). ...

  • delay

    Takes a body of expressions and yields a Delay object that will invoke the body only the first time it is forced (with...

  • delay?

    returns true if x is a Delay created with delay

  • deliver

    Delivers the supplied value to the promise, releasing any pending derefs. A subsequent call to deliver on a promise wi...

  • denominator

    Returns the denominator part of a Ratio.

  • deref

    Also reader macro: @ref/@agent/@var/@atom/@delay/@future/@promise. Within a transaction, returns the in-transaction-va...

  • derive

    Establishes a parent/child relationship between parent and tag. Parent must be a namespace-qualified symbol or keyword...

  • descendants

    Returns the immediate and indirect children of tag, through a relationship established via derive. h must be a hierarc...

  • disj

    disj[oin]. Returns a new set of the same (hashed/sorted) type, that does not contain key(s).

  • disj!

    disj[oin]. Returns a transient set of the same (hashed/sorted) type, that does not contain key(s).

  • dissoc

    dissoc[iate]. Returns a new map of the same (hashed/sorted) type, that does not contain a mapping for key(s).

  • dissoc!

    Returns a transient map that doesn't contain a mapping for key(s).

  • distinct

    Returns a lazy sequence of the elements of coll with duplicates removed. Returns a stateful transducer when no collect...

  • distinct?

    Returns true if no two of the arguments are =

  • do

    Evaluates expressions in order, returning the last.

  • doall

    When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce ...

  • dorun

    When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce ...

  • doseq

    Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by "for". Does not ret...

  • dosync

    Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls. Starts a transaction...

  • dotimes

    bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 throug...

  • doto

    Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given argumen...

  • double

    Coerce to double

  • double-array

    Creates an array of doubles

  • double?

    Return true if x is a Double

  • doubles

    Casts to double[]

  • drop

    Returns a laziness-preserving sequence of all but the first n items in coll. Returns a stateful transducer when no col...

  • drop-last

    Return a lazy sequence of all but the last n (default 1) items in coll

  • drop-while

    Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical false....

E

  • eduction

    Returns a reducible/iterable application of the transducers to the items in coll. Transducers are applied in order as ...

  • empty

    Returns an empty collection of the same category as coll, or nil

  • empty?

    Returns true if coll has no items. To check the emptiness of a seq, please use the idiom (seq x) rather than (not (emp...

  • ensure

    Must be called in a transaction. Protects the ref from modification by other transactions. Returns the in-transaction...

  • ensure-reduced

    If x is already reduced?, returns it, else returns (reduced x)

  • enumeration-seq

    Returns a seq on a java.util.Enumeration

  • error-handler

    Returns the error-handler of agent a, or nil if there is none. See set-error-handler!

  • error-mode

    Returns the error-mode of agent a. See set-error-mode!

  • eval

    Evaluates the form data structure (not text!) and returns the result.

  • even?

    Returns true if n is even, throws an exception if n is not an integer

  • every-pred

    Takes a set of predicates and returns a function f that returns true if all of its composing predicates return a logic...

  • every?

    Returns true if (pred x) is logical true for every x in coll, else false.

  • ex-cause

    Returns the cause of ex if ex is a Throwable. Otherwise returns nil.

  • ex-data

    Returns exception data (a map) if ex is an IExceptionInfo. Otherwise returns nil.

  • ex-info

    Create an instance of ExceptionInfo, a RuntimeException subclass that carries a map of additional data.

  • ex-message

    Returns the message attached to ex if ex is a Throwable. Otherwise returns nil.

  • extend

    Implementations of protocol methods can be provided using the extend construct: (extend AType AProtocol {:fo...

  • extend-protocol

    Useful when you want to provide several implementations of the same protocol all at once. Takes a single protocol and ...

  • extend-type

    A macro that expands into an extend call. Useful when you are supplying the definitions explicitly inline, extend-type...

  • extenders

    Returns a collection of the types explicitly extending protocol

  • extends?

    Returns true if atype extends protocol

F

  • false?

    Returns true if x is the value false, false otherwise.

  • ffirst

    Same as (first (first x))

  • file-seq

    A tree seq on java.io.Files

  • filter

    Returns a lazy sequence of the items in coll for which (pred item) returns logical true. pred must be free of side-eff...

  • filterv

    Returns a vector of the items in coll for which (pred item) returns logical true. pred must be free of side-effects.

  • finally

    Finally clause inside try, runs on exit.

  • find

    Returns the map entry for key, or nil if key not present.

  • find-keyword

    Returns a Keyword with the given namespace and name if one already exists. This function will not intern a new keywor...

  • find-ns

    Returns the namespace named by the symbol or nil if it doesn't exist.

  • find-var

    Returns the global var named by the namespace-qualified symbol, or nil if no var with that name.

  • first

    Returns the first item in the collection. Calls seq on its argument. If coll is nil, returns nil.

  • flatten

    Takes any nested combination of sequential things (lists, vectors, etc.) and returns their contents as a single, flat ...

  • float

    Coerce to float

  • float-array

    Creates an array of floats

  • float?

    Returns true if n is a floating point number

  • floats

    Casts to float[]

  • flush

    Flushes the output stream that is the current value of *out*

  • fn

    params => positional-params*, or positional-params* & rest-param positional-param => binding-form rest-param => bind...

  • fn?

    Returns true if x implements Fn, i.e. is an object created via fn.

  • fnext

    Same as (first (next x))

  • fnil

    Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x...

  • for

    List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more ...

  • force

    If x is a Delay, returns the (possibly cached) value of its expression, else returns x

  • format

    Formats a string using java.lang.String.format, see java.util.Formatter for format string syntax

  • frequencies

    Returns a map from distinct items in coll to the number of times they appear.

  • future

    Takes a body of expressions and yields a future object that will invoke the body in another thread, and will cache the...

  • future-call

    Takes a function of no args and yields a future object that will invoke the function in another thread, and will cache...

  • future-cancel

    Cancels the future, if possible.

  • future-cancelled?

    Returns true if future f is cancelled

  • future-done?

    Returns true if future f is done

  • future?

    Returns true if x is a future

G

  • gen-class

    When compiling, generates compiled bytecode for a class with the given package-qualified :name (which, as all names in...

  • gen-interface

    When compiling, generates compiled bytecode for an interface with the given package-qualified :name (which, as all nam...

  • gensym

    Returns a new symbol with a unique name. If a prefix string is supplied, the name is prefix# where # is some unique nu...

  • get

    Returns the value mapped to key, not-found or nil if key not present in associative collection, set, string, array, or...

  • get-in

    Returns the value in a nested associative structure, where ks is a sequence of keys. Returns nil if the key is not p...

  • get-method

    Given a multimethod and a dispatch value, returns the dispatch fn that would apply to that value, or nil if none apply...

  • get-proxy-class

    Takes an optional single class followed by zero or more interfaces. If not supplied class defaults to Object. Creates...

  • get-thread-bindings

    Get a map with the Var/value pairs which is currently in effect for the current thread.

  • get-validator

    Gets the validator-fn for a var/ref/agent/atom.

  • group-by

    Returns a map of the elements of coll keyed by the result of f on each element. The value at each key will be a vector...

H

  • halt-when

    Returns a transducer that ends transduction when pred returns true for an input. When retf is supplied it must be a fn...

  • hash

    Returns the hash code of its argument. Note this is the hash code consistent with =, and thus is different than .hashC...

  • hash-map

    keyval => key val Returns a new hash map with supplied mappings. If any keys are equal, they are handled as if by r...

  • hash-ordered-coll

    Returns the hash code, consistent with =, for an external ordered collection implementing Iterable. See http://clo...

  • hash-set

    Returns a new hash set with supplied keys. Any equal keys are handled as if by repeated uses of conj.

  • hash-unordered-coll

    Returns the hash code, consistent with =, for an external unordered collection implementing Iterable. For maps, the i...

I

  • ident?

    Return true if x is a symbol or keyword

  • identical?

    Tests if 2 arguments are the same object

  • identity

    Returns its argument.

  • if

    Evaluates test, then consequent or alternative.

  • if-let

    bindings => binding-form test If test is true, evaluates then with binding-form bound to the value of test, if not...

  • if-not

    Evaluates test. If logical false, evaluates and returns then expr, otherwise else expr, if supplied, else nil.

  • if-some

    bindings => binding-form test If test is not nil, evaluates then with binding-form bound to the value of test, if...

  • ifn?

    Returns true if x implements IFn. Note that many data structures (e.g. sets and maps) implement IFn

  • import

    import-list => (package-symbol class-name-symbols*) For each name in class-name-symbols, adds a mapping from name to ...

  • in-ns

    Sets *ns* to the namespace named by the symbol, creating it if needed.

  • inc

    Returns a number one greater than num. Does not auto-promote longs, will throw on overflow. See also: inc'

  • inc'

    Returns a number one greater than num. Supports arbitrary precision. See also: inc

  • indexed?

    Return true if coll implements Indexed, indicating efficient lookup by index

  • infinite?

    Returns true if num is negative or positive infinity, else false

  • init-proxy

    Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces)...

  • inst-ms

    Return the number of milliseconds since January 1, 1970, 00:00:00 GMT

  • inst?

    Return true if x satisfies Inst

  • instance?

    Evaluates x and tests if it is an instance of the class c. Returns true or false

  • int

    Coerce to int

  • int-array

    Creates an array of ints

  • int?

    Return true if x is a fixed precision integer

  • integer?

    Returns true if n is an integer

  • interleave

    Returns a lazy seq of the first item in each coll, then the second etc.

  • intern

    Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting it...

  • interpose

    Returns a lazy seq of the elements of coll separated by sep. Returns a stateful transducer when no collection is provi...

  • into

    Returns a new coll consisting of to with all of the items of from conjoined. A transducer may be supplied. (into x) ...

  • into-array

    Returns an array with components set to the values in aseq. The array's component type is type if provided, or the typ...

  • ints

    Casts to int[]

  • io!

    If an io! block occurs in a transaction, throws an IllegalStateException, else runs body in an implicit do. If the f...

  • isa?

    Returns true if (= child parent), or child is directly or indirectly derived from parent, either via a Java type inher...

  • iterate

    Returns a lazy (infinite!) sequence of x, (f x), (f (f x)) etc. f must be free of side-effects

  • iteration

    Creates a seqable/reducible via repeated calls to step, a function of some (continuation token) 'k'. The first call to...

  • iterator-seq

    Returns a seq on a java.util.Iterator. Note that most collections providing iterators implement Iterable and thus supp...

J

  • juxt

    Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable nu...

K

  • keep

    Returns a lazy sequence of the non-nil results of (f item). Note, this means false return values will be included. f ...

  • keep-indexed

    Returns a lazy sequence of the non-nil results of (f index item). Note, this means false return values will be include...

  • key

    Returns the key of the map entry.

  • keys

    Returns a sequence of the map's keys, in the same order as (seq map).

  • keyword

    Returns a Keyword with the given namespace and name. Do not use : in the keyword strings, it will be added automatica...

  • keyword?

    Return true if x is a Keyword

L

  • last

    Return the last item in coll, in linear time

  • lazy-cat

    Expands to code which yields a lazy sequence of the concatenation of the supplied colls. Each coll expr is not evalua...

  • lazy-seq

    Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only th...

  • let

    binding => binding-form init-expr binding-form => name, or destructuring-form destructuring-form => map-destructure-...

  • letfn

    fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+) Takes a vector of function specs and a body, and gen...

  • line-seq

    Returns the lines of text from rdr as a lazy sequence of strings. rdr must implement java.io.BufferedReader.

  • list

    Creates a new list containing the items.

  • list*

    Creates a new seq containing the items prepended to the rest, the last of which will be treated as a sequence.

  • list?

    Returns true if x implements IPersistentList

  • load

    Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash ...

  • load-file

    Sequentially read and evaluate the set of forms contained in the file.

  • load-reader

    Sequentially read and evaluate the set of forms contained in the stream/file

  • load-string

    Sequentially read and evaluate the set of forms contained in the string

  • loaded-libs

    Returns a sorted set of symbols naming the currently loaded libs

  • locking

    Executes exprs in an implicit do, while holding the monitor of x. Will release the monitor of x in all circumstances.

  • long

    Coerce to long

  • long-array

    Creates an array of longs

  • longs

    Casts to long[]

  • loop

    Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-...

M

  • macroexpand

    Repeatedly calls macroexpand-1 on form until it no longer represents a macro form, then returns it. Note neither ma...

  • macroexpand-1

    If form represents a macro form, returns its expansion, else returns form.

  • make-array

    Creates and returns an array of instances of the specified class of the specified dimension(s). Note that a class obj...

  • make-hierarchy

    Creates a hierarchy object for use with derive, isa? etc.

  • map

    Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by app...

  • map-entry?

    Return true if x is a map entry

  • map-indexed

    Returns a lazy sequence consisting of the result of applying f to 0 and the first item of coll, followed by applying f...

  • map?

    Return true if x implements IPersistentMap

  • mapcat

    Returns the result of applying concat to the result of applying map to f and colls. Thus function f should return a c...

  • mapv

    Returns a vector consisting of the result of applying f to the set of first items of each coll, followed by applying f...

  • max

    Returns the greatest of the nums.

  • max-key

    Returns the x for which (k x), a number, is greatest. If there are multiple such xs, the last one is returned.

  • memfn

    Expands into code that creates a fn that expects to be passed an object and any args and calls the named instance meth...

  • memoize

    Returns a memoized version of a referentially transparent function. The memoized version of the function keeps a cache...

  • merge

    Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the...

  • merge-with

    Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the...

  • meta

    Returns the metadata of obj, returns nil if there is no metadata.

  • methods

    Given a multimethod, returns a map of dispatch values -> dispatch fns

  • min

    Returns the least of the nums.

  • min-key

    Returns the x for which (k x), a number, is least. If there are multiple such xs, the last one is returned.

  • mix-collection-hash

    Mix final collection hash for ordered or unordered collections. hash-basis is the combined collection hash, count is ...

  • mod

    Modulus of num and div. Truncates toward negative infinity.

  • monitor-enter

    Acquires the monitor of an object.

  • monitor-exit

    Releases the monitor of an object.

N

  • NaN?

    Returns true if num is NaN, else false

  • name

    Returns the name String of a string, symbol or keyword.

  • namespace

    Returns the namespace String of a symbol or keyword, or nil if not present.

  • namespace-munge

    Convert a Clojure namespace name to a legal Java package name.

  • nat-int?

    Return true if x is a non-negative fixed precision integer

  • neg-int?

    Return true if x is a negative fixed precision integer

  • neg?

    Returns true if num is less than zero, else false

  • new

    Creates a new instance of a class.

  • newline

    Writes a platform-specific newline to *out*

  • next

    Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil.

  • nfirst

    Same as (next (first x))

  • nil?

    Returns true if x is nil, false otherwise.

  • nnext

    Same as (next (next x))

  • not

    Returns true if x is logical false, false otherwise.

  • not-any?

    Returns false if (pred x) is logical true for any x in coll, else true.

  • not-empty

    If coll is empty, returns nil, else coll

  • not-every?

    Returns false if (pred x) is logical true for every x in coll, else true.

  • not=

    Same as (not (= obj1 obj2))

  • ns

    Sets *ns* to the namespace named by name (unevaluated), creating it if needed. references can be zero or more of: (:r...

  • ns-aliases

    Returns a map of the aliases for the namespace.

  • ns-imports

    Returns a map of the import mappings for the namespace.

  • ns-interns

    Returns a map of the intern mappings for the namespace.

  • ns-map

    Returns a map of all the mappings for the namespace.

  • ns-name

    Returns the name of the namespace, a symbol.

  • ns-publics

    Returns a map of the public intern mappings for the namespace.

  • ns-refers

    Returns a map of the refer mappings for the namespace.

  • ns-resolve

    Returns the var or Class to which a symbol will be resolved in the namespace (unless found in the environment), else n...

  • ns-unalias

    Removes the alias for the symbol from the namespace.

  • ns-unmap

    Removes the mappings for the symbol from the namespace.

  • nth

    Returns the value at the index. get returns nil if index out of bounds, nth throws an exception unless not-found is su...

  • nthnext

    Returns the nth next of coll, (seq coll) when n is 0.

  • nthrest

    Returns the nth rest of coll, coll when n is 0.

  • num

    Coerce to Number

  • number?

    Returns true if x is a Number

  • numerator

    Returns the numerator part of a Ratio.

O

  • object-array

    Creates an array of objects

  • odd?

    Returns true if n is odd, throws an exception if n is not an integer

  • or

    Evaluates exprs one at a time, from left to right. If a form returns a logical true value, or returns that value and d...

P

  • PrintWriter-on

    implements java.io.PrintWriter given flush-fn, which will be called when .flush() is called, with a string built up si...

  • parents

    Returns the immediate parents of tag, either via a Java type inheritance relationship or a relationship established vi...

  • parse-boolean

    Parse strings "true" or "false" and return a boolean, or nil if invalid

  • parse-double

    Parse string with floating point components and return a Double value, or nil if parse fails. Grammar: https://docs...

  • parse-long

    Parse string of decimal digits with optional leading -/+ and return a Long value, or nil if parse fails

  • parse-uuid

    Parse a string representing a UUID and return a java.util.UUID instance, or nil if parse fails. Grammar: https://do...

  • partial

    Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of addition...

  • partition

    Returns a lazy sequence of lists of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e. ...

  • partition-all

    Returns a lazy sequence of lists like partition, but may include partitions with fewer than n items at the end. Retur...

  • partition-by

    Applies f to each value in coll, splitting it each time f returns a new value. Returns a lazy seq of partitions. Re...

  • partitionv

    Returns a lazy sequence of vectors of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e...

  • partitionv-all

    Returns a lazy sequence of vector partitions, but may include partitions with fewer than n items at the end. Returns...

  • pcalls

    Executes the no-arg fns in parallel, returning a lazy sequence of their values

  • peek

    For a list or queue, same as first, for a vector, same as, but much more efficient than, last. If the collection is em...

  • persistent!

    Returns a new, persistent version of the transient collection, in constant time. The transient collection cannot be us...

  • pmap

    Like map, except f is applied in parallel. Semi-lazy in that the parallel computation stays ahead of the consumption, ...

  • pop

    For a list or queue, returns a new list/queue without the first item, for a vector, returns a new vector without the l...

  • pop!

    Removes the last item from a transient vector. If the collection is empty, throws an exception. Returns coll

  • pop-thread-bindings

    Pop one set of bindings pushed with push-binding before. It is an error to pop bindings without pushing before.

  • pos-int?

    Return true if x is a positive fixed precision integer

  • pos?

    Returns true if num is greater than zero, else false

  • pr

    Prints the object(s) to the output stream that is the current value of *out*. Prints the object(s), separated by spac...

  • pr-str

    pr to a string, returning it

  • prefer-method

    Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y when there is a conflict

  • prefers

    Given a multimethod, returns a map of preferred value -> set of other values

  • print

    Prints the object(s) to the output stream that is the current value of *out*. print and println produce output for hu...

  • print-str

    print to a string, returning it

  • printf

    Prints formatted output, as per format

  • println

    Same as print followed by (newline)

  • println-str

    println to a string, returning it

  • prn

    Same as pr followed by (newline). Observes *flush-on-newline*

  • prn-str

    prn to a string, returning it

  • promise

    Returns a promise object that can be read with deref/@, and set, once only, with deliver. Calls to deref/@ prior to de...

  • proxy

    class-and-interfaces - a vector of class names args - a (possibly empty) vector of arguments to the superclass cons...

  • proxy-mappings

    Takes a proxy instance and returns the proxy's fn map.

  • proxy-super

    Use to call a superclass method in the body of a proxy method. Note, expansion captures 'this

  • push-thread-bindings

    WARNING: This is a low-level function. Prefer high-level macros like binding where ever possible. Takes a map of Va...

  • pvalues

    Returns a lazy sequence of the values of the exprs, which are evaluated in parallel

Q

  • qualified-ident?

    Return true if x is a symbol or keyword with a namespace

  • qualified-keyword?

    Return true if x is a keyword with a namespace

  • qualified-symbol?

    Return true if x is a symbol with a namespace

  • quot

    quot[ient] of dividing numerator by denominator.

  • quote

    Yields the unevaluated form.

R

  • rand

    Returns a random floating point number between 0 (inclusive) and n (default 1) (exclusive).

  • rand-int

    Returns a random integer between 0 (inclusive) and n (exclusive).

  • rand-nth

    Return a random element of the (sequential) collection. Will have the same performance characteristics as nth for the ...

  • random-sample

    Returns items from coll with random probability of prob (0.0 - 1.0). Returns a transducer when no collection is provi...

  • random-uuid

    Returns a pseudo-randomly generated java.util.UUID instance (i.e. type 4). See: https://docs.oracle.com/javase/8/docs...

  • range

    Returns a lazy seq of nums from start (inclusive) to end (exclusive), by step, where start defaults to 0, step to 1, a...

  • ratio?

    Returns true if n is a Ratio

  • rational?

    Returns true if n is a rational number

  • rationalize

    returns the rational value of num

  • re-find

    Returns the next regex match, if any, of string to pattern, using java.util.regex.Matcher.find(). Uses re-groups to r...

  • re-groups

    Returns the groups from the most recent match/find. If there are no nested groups, returns a string of the entire matc...

  • re-matcher

    Returns an instance of java.util.regex.Matcher, for use, e.g. in re-find.

  • re-matches

    Returns the match, if any, of string to pattern, using java.util.regex.Matcher.matches(). Uses re-groups to return th...

  • re-pattern

    Returns an instance of java.util.regex.Pattern, for use, e.g. in re-matcher.

  • re-seq

    Returns a lazy sequence of successive matches of pattern in string, using java.util.regex.Matcher.find(), each such ma...

  • read

    Reads the next object from stream, which must be an instance of java.io.PushbackReader or some derivee. stream defaul...

  • read+string

    Like read, and taking the same args. stream must be a LineNumberingPushbackReader. Returns a vector containing the obj...

  • read-line

    Reads the next line from stream that is the current value of *in* .

  • read-string

    Reads one object from the string s. Optionally include reader options, as specified in read. Note that read-string ...

  • reader-conditional

    Construct a data representation of a reader conditional. If true, splicing? indicates read-cond-splicing.

  • reader-conditional?

    Return true if the value is the data representation of a reader conditional

  • realized?

    Returns true if a value has been produced for a promise, delay, future or lazy sequence.

  • record?

    Returns true if x is a record

  • recur

    Rebinds and transfers control to the recursion point.

  • reduce

    f should be a function of 2 arguments. If val is not supplied, returns the result of applying f to the first 2 items i...

  • reduce-kv

    Reduces an associative collection. f should be a function of 3 arguments. Returns the result of applying f to init, th...

  • reduced

    Wraps x in a way such that a reduce will terminate with the value x

  • reduced?

    Returns true if x is the result of a call to reduced

  • reductions

    Returns a lazy seq of the intermediate values of the reduction (as per reduce) of coll by f, starting with init.

  • ref

    Creates and returns a Ref with an initial value of x and zero or more options (in any order): :meta metadata-map ...

  • ref-history-count

    Returns the history count of a ref

  • ref-max-history

    Gets the max-history of a ref, or sets it and returns the ref

  • ref-min-history

    Gets the min-history of a ref, or sets it and returns the ref

  • ref-set

    Must be called in a transaction. Sets the value of ref. Returns val.

  • refer

    refers to all public vars of ns, subject to filters. filters can include at most one each of: :exclude list-of-symb...

  • refer-clojure

    Same as (refer 'clojure.core <filters>)

  • reify

    reify creates an object implementing a protocol or interface. reify is a macro with the following structure: (reify ...

  • release-pending-sends

    Normally, actions sent directly or indirectly during another action are held until the action completes (changes the a...

  • rem

    remainder of dividing numerator by denominator.

  • remove

    Returns a lazy sequence of the items in coll for which (pred item) returns logical false. pred must be free of side-ef...

  • remove-all-methods

    Removes all of the methods of multimethod.

  • remove-method

    Removes the method of multimethod associated with dispatch-value.

  • remove-ns

    Removes the namespace named by the symbol. Use with caution. Cannot be used to remove the clojure namespace.

  • remove-tap

    Remove f from the tap set.

  • remove-watch

    Removes a watch (set by add-watch) from a reference

  • repeat

    Returns a lazy (infinite!, or length n if supplied) sequence of xs.

  • repeatedly

    Takes a function of no args, presumably with side effects, and returns an infinite (or length n if supplied) lazy sequ...

  • replace

    Given a map of replacement pairs and a vector/collection, returns a vector/seq with any elements = a key in smap repla...

  • require

    Loads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib, a prefix li...

  • requiring-resolve

    Resolves namespace-qualified sym per 'resolve'. If initial resolve fails, attempts to require sym's namespace and retrie...

  • reset!

    Sets the value of atom to newval without regard for the current value. Returns newval.

  • reset-meta!

    Atomically resets the metadata for a namespace/var/ref/agent/atom

  • reset-vals!

    Sets the value of atom to newval. Returns [old new], the value of the atom before and after the reset.

  • resolve

    same as (ns-resolve *ns* symbol) or (ns-resolve *ns* &env symbol)

  • rest

    Returns a possibly empty seq of the items after the first. Calls seq on its argument.

  • restart-agent

    When an agent is failed, changes the agent state to new-state and then un-fails the agent so that sends are allowed ag...

  • resultset-seq

    Creates and returns a lazy sequence of structmaps corresponding to the rows in the java.sql.ResultSet rs

  • reverse

    Returns a seq of the items in coll in reverse order. Not lazy.

  • reversible?

    Returns true if coll implements Reversible

  • rseq

    Returns, in constant time, a seq of the items in rev (which can be a vector or sorted-map), in reverse order. If rev i...

  • rsubseq

    sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a reverse seq of those entries with keys ek for...

  • run!

    Runs the supplied procedure (via reduce), for purposes of side effects, on successive items in the collection. Returns...

S

  • StackTraceElement->vec

    Constructs a data representation for a StackTraceElement: [class method file line]

  • satisfies?

    Returns true if x satisfies the protocol

  • second

    Same as (first (next x))

  • select-keys

    Returns a map containing only those entries in map whose key is in keys

  • send

    Dispatch an action to an agent. Returns the agent immediately. Subsequently, in a thread from a thread pool, the state...

  • send-off

    Dispatch a potentially blocking action to an agent. Returns the agent immediately. Subsequently, in a separate thread,...

  • send-via

    Dispatch an action to an agent. Returns the agent immediately. Subsequently, in a thread supplied by executor, the sta...

  • seq

    Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on ...

  • seq-to-map-for-destructuring

    Builds a map from a seq as described in https://clojure.org/reference/special_forms#keyword-arguments

  • seq?

    Return true if x implements ISeq

  • seqable?

    Return true if the seq function is supported for x

  • seque

    Creates a queued seq on another (presumably lazy) seq s. The queued seq will produce a concrete seq in the background,...

  • sequence

    Coerces coll to a (possibly empty) sequence, if it is not already one. Will not force a lazy seq. (sequence nil) yield...

  • sequential?

    Returns true if coll implements Sequential

  • set

    Returns a set of the distinct elements of coll.

  • set!

    Assigns a new value to a var or field.

  • set-agent-send-executor!

    Sets the ExecutorService to be used by send

  • set-agent-send-off-executor!

    Sets the ExecutorService to be used by send-off

  • set-error-handler!

    Sets the error-handler of agent a to handler-fn. If an action being run by the agent throws an exception or doesn't p...

  • set-error-mode!

    Sets the error-mode of agent a to mode-keyword, which must be either :fail or :continue. If an action being run by th...

  • set-validator!

    Sets the validator-fn for a var/ref/agent/atom. validator-fn must be nil or a side-effect-free fn of one argument, whi...

  • set?

    Returns true if x implements IPersistentSet

  • short

    Coerce to short

  • short-array

    Creates an array of shorts

  • shorts

    Casts to shorts[]

  • shuffle

    Return a random permutation of coll

  • shutdown-agents

    Initiates a shutdown of the thread pools that back the agent system. Running actions will complete, but no new actions...

  • simple-ident?

    Return true if x is a symbol or keyword without a namespace

  • simple-keyword?

    Return true if x is a keyword without a namespace

  • simple-symbol?

    Return true if x is a symbol without a namespace

  • slurp

    Opens a reader on f and reads all its contents, returning a string. See clojure.java.io/reader for a complete list of ...

  • some

    Returns the first logical true value of (pred x) for any x in coll, else nil. One common idiom is to use a set as pre...

  • some->

    When expr is not nil, threads it into the first form (via ->), and when that result is not nil, through the next etc

  • some->>

    When expr is not nil, threads it into the first form (via ->>), and when that result is not nil, through the next etc

  • some-fn

    Takes a set of predicates and returns a function f that returns the first logical true value returned by one of its co...

  • some?

    Returns true if x is not nil, false otherwise.

  • sort

    Returns a sorted sequence of the items in coll. If no comparator is supplied, uses compare. comparator must implement...

  • sort-by

    Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). If no c...

  • sorted-map

    keyval => key val Returns a new sorted map with supplied mappings. If any keys are equal, they are handled as if by...

  • sorted-map-by

    keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator. If any keys are e...

  • sorted-set

    Returns a new sorted set with supplied keys. Any equal keys are handled as if by repeated uses of conj.

  • sorted-set-by

    Returns a new sorted set with supplied keys, using the supplied comparator. Any equal keys are handled as if by repea...

  • sorted?

    Returns true if coll implements Sorted

  • special-symbol?

    Returns true if s names a special form

  • spit

    Opposite of slurp. Opens f with writer, writes content, then closes f. Options passed to clojure.java.io/writer.

  • split-at

    Returns a vector of [(take n coll) (drop n coll)]

  • split-with

    Returns a vector of [(take-while pred coll) (drop-while pred coll)]

  • splitv-at

    Returns a vector of [(into [] (take n) coll) (drop n coll)]

  • str

    With no args, returns the empty string. With one arg x, returns x.toString(). (str nil) returns the empty string. Wit...

  • stream-into!

    Returns a new coll consisting of coll with all of the items of the stream conjoined. This is a terminal operation on t...

  • stream-reduce!

    Works like reduce but takes a java.util.stream.BaseStream as its source. Honors 'reduced', is a terminal operation on ...

  • stream-seq!

    Takes a java.util.stream.BaseStream instance s and returns a seq of its contents. This is a terminal operation on the ...

  • stream-transduce!

    Works like transduce but takes a java.util.stream.BaseStream as its source. This is a terminal operation on the stream...

  • string?

    Return true if x is a String

  • struct

    Returns a new structmap instance with the keys of the structure-basis. vals must be supplied for basis keys in order -...

  • struct-map

    Returns a new structmap instance with the keys of the structure-basis. keyvals may contain all, some or none of the ba...

  • subs

    Returns the substring of s beginning at start inclusive, and ending at end (defaults to length of string), exclusive.

  • subseq

    sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a seq of those entries with keys ek for which...

  • subvec

    Returns a persistent vector of the items in vector from start (inclusive) to end (exclusive). If end is not supplied,...

  • supers

    Returns the immediate and indirect superclasses and interfaces of c, if any

  • swap!

    Atomically swaps the value of atom to be: (apply f current-value-of-atom args). Note that f may be called multiple t...

  • swap-vals!

    Atomically swaps the value of atom to be: (apply f current-value-of-atom args). Note that f may be called multiple t...

  • symbol

    Returns a Symbol with the given namespace and name. Arity-1 works on strings, keywords, and vars.

  • symbol?

    Return true if x is a Symbol

  • sync

    transaction-flags => TBD, pass nil for now Runs the exprs (in an implicit do) in a transaction that encompasses exp...

T

  • Throwable->map

    Constructs a data representation for a Throwable with keys: :cause - root cause message :phase - error phase ...

  • tagged-literal

    Construct a data representation of a tagged literal from a tag symbol and a form.

  • tagged-literal?

    Return true if the value is the data representation of a tagged literal

  • take

    Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n. Returns a stateful tran...

  • take-last

    Returns a seq of the last n items in coll. Depending on the type of coll may be no better than linear time. For vect...

  • take-nth

    Returns a lazy seq of every nth item in coll. Returns a stateful transducer when no collection is provided.

  • take-while

    Returns a lazy sequence of successive items from coll while (pred item) returns logical true. pred must be free of sid...

  • tap>

    sends x to any taps. Will not block. Returns true if there was room in the queue, false if not (dropped).

  • test

    test [v] finds fn at key :test in var metadata and calls it, presuming failure will throw exception

  • the-ns

    If passed a namespace, returns it. Else, when passed a symbol, returns the namespace named by it, throwing an exceptio...

  • thread-bound?

    Returns true if all of the vars provided as arguments have thread-local bindings. Implies that set!'ing the provided ...

  • throw

    Throws an instance of Throwable.

  • time

    Evaluates expr and prints the time it took. Returns the value of expr.

  • to-array

    Returns an array of Objects containing the contents of coll, which can be any Collection. Maps to java.util.Collectio...

  • to-array-2d

    Returns a (potentially-ragged) 2-dimensional array of Objects containing the contents of coll, which can be any Collec...

  • trampoline

    trampoline can be used to convert algorithms requiring mutual recursion without stack consumption. Calls f with suppli...

  • transduce

    reduce with a transformation of f (xf). If init is not supplied, (f) will be called to produce it. f should be a reduc...

  • transient

    Returns a new, transient version of the collection, in constant time. Transients support a parallel set of 'changing'...

  • tree-seq

    Returns a lazy sequence of the nodes in a tree, via a depth-first walk. branch? must be a fn of one arg that returns ...

  • true?

    Returns true if x is the value true, false otherwise.

  • try

    try / catch / finally exception handling.

  • type

    Returns the :type metadata of x, or its Class if none

U

  • unchecked-add

    Returns the sum of x and y, both long. Note - uses a primitive operator subject to overflow.

  • unchecked-add-int

    Returns the sum of x and y, both int. Note - uses a primitive operator subject to overflow.

  • unchecked-byte

    Coerce to byte. Subject to rounding or truncation.

  • unchecked-char

    Coerce to char. Subject to rounding or truncation.

  • unchecked-dec

    Returns a number one less than x, a long. Note - uses a primitive operator subject to overflow.

  • unchecked-dec-int

    Returns a number one less than x, an int. Note - uses a primitive operator subject to overflow.

  • unchecked-divide-int

    Returns the division of x by y, both int. Note - uses a primitive operator subject to truncation.

  • unchecked-double

    Coerce to double. Subject to rounding.

  • unchecked-float

    Coerce to float. Subject to rounding.

  • unchecked-inc

    Returns a number one greater than x, a long. Note - uses a primitive operator subject to overflow.

  • unchecked-inc-int

    Returns a number one greater than x, an int. Note - uses a primitive operator subject to overflow.

  • unchecked-int

    Coerce to int. Subject to rounding or truncation.

  • unchecked-long

    Coerce to long. Subject to rounding or truncation.

  • unchecked-multiply

    Returns the product of x and y, both long. Note - uses a primitive operator subject to overflow.

  • unchecked-multiply-int

    Returns the product of x and y, both int. Note - uses a primitive operator subject to overflow.

  • unchecked-negate

    Returns the negation of x, a long. Note - uses a primitive operator subject to overflow.

  • unchecked-negate-int

    Returns the negation of x, an int. Note - uses a primitive operator subject to overflow.

  • unchecked-remainder-int

    Returns the remainder of division of x by y, both int. Note - uses a primitive operator subject to truncation.

  • unchecked-short

    Coerce to short. Subject to rounding or truncation.

  • unchecked-subtract

    Returns the difference of x and y, both long. Note - uses a primitive operator subject to overflow.

  • unchecked-subtract-int

    Returns the difference of x and y, both int. Note - uses a primitive operator subject to overflow.

  • underive

    Removes a parent/child relationship between parent and tag. h must be a hierarchy obtained from make-hierarchy, if not...

  • unreduced

    If x is reduced?, returns (deref x), else returns x

  • unsigned-bit-shift-right

    Bitwise shift right, without sign-extension.

  • update

    'Updates' a value in an associative structure, where k is a key and f is a function that will take the old value and...

  • update-in

    'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take...

  • update-keys

    m f => {(f k) v ...} Given a map m and a function f of 1-argument, returns a new map whose keys are the result of a...

  • update-proxy

    Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces)...

  • update-vals

    m f => {k (f v) ...} Given a map m and a function f of 1-argument, returns a new map where the keys of m are mapped...

  • uri?

    Return true if x is a java.net.URI

  • use

    Like 'require, but also refers to each lib's namespace using clojure.core/refer. Use :use in the ns macro in preferenc...

  • uuid?

    Return true if x is a java.util.UUID

V

  • val

    Returns the value in the map entry.

  • vals

    Returns a sequence of the map's values, in the same order as (seq map).

  • var

    Resolves a symbol to its Var object.

  • var-get

    Gets the value in the var object

  • var-set

    Sets the value in the var object to val. The var must be thread-locally bound.

  • var?

    Returns true if v is of type clojure.lang.Var

  • vary-meta

    Returns an object of the same type and value as obj, with (apply f (meta obj) args) as its metadata.

  • vec

    Creates a new vector containing the contents of coll. Java arrays will be aliased and should not be modified.

  • vector

    Creates a new vector containing the args.

  • vector-of

    Creates a new vector of a single primitive type t, where t is one of :int :long :float :double :byte :short :char or :...

  • vector?

    Return true if x implements IPersistentVector

  • volatile!

    Creates and returns a Volatile with an initial value of val.

  • volatile?

    Returns true if x is a volatile.

  • vreset!

    Sets the value of volatile to newval without regard for the current value. Returns newval.

  • vswap!

    Non-atomically swaps the value of the volatile as if: (apply f current-value-of-vol args). Returns the value that ...

W

  • when

    Evaluates test. If logical true, evaluates body in an implicit do.

  • when-first

    bindings => x xs Roughly the same as (when (seq xs) (let [x (first xs)] body)) but xs is evaluated only once

  • when-let

    bindings => binding-form test When test is true, evaluates body with binding-form bound to the value of test

  • when-not

    Evaluates test. If logical false, evaluates body in an implicit do.

  • when-some

    bindings => binding-form test When test is not nil, evaluates body with binding-form bound to the value of test

  • while

    Repeatedly executes body while test expression is true. Presumes some side-effect will cause test to become false/nil....

  • with-bindings

    Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. Then execu...

  • with-bindings*

    Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. Then calls...

  • with-in-str

    Evaluates body in a context in which *in* is bound to a fresh StringReader initialized with the string s.

  • with-local-vars

    varbinding=> symbol init-expr Executes the exprs in a context in which the symbols are bound to vars with per-threa...

  • with-meta

    Returns an object of the same type and value as obj, with map m as its metadata.

  • with-open

    bindings => [name init ...] Evaluates body in a try expression with names bound to the values of the inits, and a f...

  • with-out-str

    Evaluates exprs in a context in which *out* is bound to a fresh StringWriter. Returns the string created by any neste...

  • with-precision

    Sets the precision and rounding mode to be used for BigDecimal operations. Usage: (with-precision 10 (/ 1M 3)) or: ...

  • with-redefs

    binding => var-symbol temp-value-expr Temporarily redefines Vars while executing the body. The temp-value-exprs wi...

  • with-redefs-fn

    Temporarily redefines Vars during a call to func. Each val of binding-map will replace the root value of its key whic...

X

  • xml-seq

    A tree seq on the xml elements as per xml/parse

Z

  • zero?

    Returns true if num is zero, else false

  • zipmap

    Returns a map with the keys mapped to the corresponding vals.

^

  • ^

    Metadata. ^{:k v} form attaches metadata to the next form.

`

  • `

    Syntax quote. Resolves symbols to fully-qualified names; allows ~ and ~@.

~

  • ~

    Unquote. Used inside syntax-quoted forms to evaluate an expression.

  • ~@

    Unquote-splicing. Splices a sequence into the surrounding form.