clojure.core
#
Regex literal. #"pattern" compiles to java.util.regex.Pattern at read time.
reader-macroVar quote. #'foo resolves to the Var object itself.
reader-macroAnonymous function shorthand. #(+ %1 %2) expands to (fn [x y] (+ x y)).
reader-macroReader conditional. #?(:clj expr :cljs expr) for .cljc files.
reader-macroSplicing reader conditional.
reader-macroDiscard. #_form causes the reader to ignore the next form.
reader-macroTagged literal for instants. #inst "2024-01-01".
reader-macroTagged literal for UUIDs.
reader-macroSet literal. #{1 2 3} creates a persistent hash set.
reader-macro
'
Quote. 'form expands to (quote form).
reader-macro
*
Returns the product of nums. (*) returns 1. Does not auto-promote longs, will throw on overflow. See also: *'
function([] [x] [x y] [x y & more])
Returns the product of nums. (*') returns 1. Supports arbitrary precision. See also: *
function([] [x] [x y] [x y & more])
bound in a repl thread to the most recent value printed
valuebound in a repl thread to the second most recent value printed
valuebound in a repl thread to the third most recent value printed
valueThe agent currently running an action on this thread, else nil
value- value
When set to logical false, 'assert' will omit assertion checks in compiled code. Defaults to true.
valueThe version info for Clojure core, as a map containing :major :minor :incremental and :qualifier keys. Feature releas...
valueA sequence of the supplied command line arguments, or nil if none were supplied
valueSet to true when compiling files, false otherwise.
valueSpecifies the directory where 'compile' will write out .class files. This directory must be in the classpath for 'comp...
valueA map of keys to options. Note, when binding dynamically make sure to merge with previous value. Supported options: ...
valueMap from reader tag symbols to data reader Vars. When Clojure starts, it searches for files named 'data_readers.clj' ...
valueWhen no data reader is found for a tag and *default-data-reader-fn* is non-nil, it will be called with two arguments, ...
valuebound in a repl thread to the most recent exception caught by the repl
valueA java.io.Writer object representing standard error for print operations. Defaults to System/err, wrapped in a PrintW...
valueThe path of the file being evaluated, as a String. When there is no file, e.g. in the REPL, the value is not defined.
valueWhen set to true, output will be flushed whenever a newline is printed. Defaults to true.
value- value
A java.io.Reader object representing standard input for read operations. Defaults to System/in, wrapped in a LineNumb...
value- value
A clojure.lang.Namespace object representing the current namespace.
valueA java.io.Writer object representing standard output for print operations. Defaults to System/out, wrapped in an Outp...
valueWhen set to logical true, objects will be printed in a way that preserves their type when read in later. Defaults t...
value*print-length* controls how many items of each collection the printer will print. If it is bound to logical false, the...
value*print-level* controls how many levels deep the printer will print nested objects. If it is bound to logical false, th...
valueIf set to logical true, when printing an object, its metadata will also be printed in a form that can be read back by ...
value*print-namespace-maps* controls whether the printer will print namespace map literal syntax. It defaults to false, but...
valueWhen set to logical false, strings and characters will be printed with non-alphanumeric characters converted to the ap...
valueDefaults to true (or value specified by system property, see below) ***This setting implies that the full power of the...
value- value
Bound to true in a repl thread
value- value
- value
While bound to true, compilations of +, -, *, inc, dec and the coercions will be done without overflow checks. While b...
value- value
- value
When set to true, the compiler will emit warnings when reflection is needed to resolve Java method calls or field acce...
value
+
-
If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Does not auto-p...
function([x] [x y] [x y & more])
If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Supports arbitr...
function([x] [x y] [x y & more])
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...
macro([x & forms])
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 ...
macro([x & forms])
Positional factory function for class clojure.core.ArrayChunk.
function([am arr off end])
Positional factory function for class clojure.core.Eduction.
function([xform coll])
Positional factory function for class clojure.core.Vec.
function([am cnt shift root tail _meta])
Positional factory function for class clojure.core.VecNode.
function([edit arr])
Positional factory function for class clojure.core.VecSeq.
function([am vec anode i offset _meta])
- function
([pf x c interf])
- function
([protocol])
.
/
If no denominators are supplied, returns 1/numerator, else returns numerator divided by all of the denominators.
function([x] [x y] [x y & more])
<
=
>
@
Deref. @ref expands to (deref ref).
reader-macro
A
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...
function([a])
Returns a fn that, given an instance of a structmap with the basis, returns the value at the key. The key must be in ...
function([s key])
Returns a clone of the Java array. Works on arrays of known types.
function([array])
adds f, a fn of one argument, to the tap set. This function will be called with anything sent via tap>. This function ...
function([f])
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...
function([reference key fn])
Creates and returns an agent with an initial value of state and zero or more options (in any order): :meta metadata...
function([state & options])
Returns the exception thrown during an asynchronous action of the agent if the agent is failed. Returns nil if the ag...
function([a])
Returns the value at the index/indices. Works on Java arrays of all types.
function([array idx] [array idx & idxs])
Returns the length of the Java array. Works on arrays of all types.
function([array])
Add an alias in the current namespace to another namespace. Arguments are two symbols: the alias to be used, and the...
function([alias namespace-sym])
Returns a sequence of all namespaces.
function([])
Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref ar...
function([ref fun & args])
Atomically sets the metadata for a namespace/var/ref/agent/atom to be: (apply f its-current-meta args) f must be f...
function([iref f & args])
Atomically alters the root binding of var v by applying f to its current value plus any args
function([v f & args])
Maps an expression across an array a, using an index named idx, and return value named ret, initialized to a clone of ...
macro([a idx ret expr])
Returns the immediate and indirect parents of tag, either via a Java type inheritance relationship or a relationship e...
function([tag] [h tag])
Evaluates exprs one at a time, from left to right. If a form returns logical false (nil or false), and returns that va...
macro([] [x] [x & next])
Returns true given any argument.
function([x])
Applies fn f to the argument list formed by prepending intervening arguments to args.
function([f args] [f x args] [f x y args] [f x y z args] [f a b c d & args])
Reduces an expression across an array a, using an index named idx, and return value named ret, initialized to init, se...
macro([a idx ret init expr])
Constructs an array-map. If any keys are equal, they are handled as if by repeated uses of assoc.
function([] [& keyvals])
Binds name to expr, evaluates the first form in the lexical context of that binding, then binds name to that result, r...
macro([expr name & forms])
Sets the value at the index/indices. Works on Java arrays of reference types. Returns val.
function([array idx val] [array idx idx2 & idxv])
Sets the value at the index/indices. Works on arrays of boolean. Returns val.
function([array idx val] [array idx idx2 & idxv])
Sets the value at the index/indices. Works on arrays of byte. Returns val.
function([array idx val] [array idx idx2 & idxv])
Sets the value at the index/indices. Works on arrays of char. Returns val.
function([array idx val] [array idx idx2 & idxv])
Sets the value at the index/indices. Works on arrays of double. Returns val.
function([array idx val] [array idx idx2 & idxv])
Sets the value at the index/indices. Works on arrays of float. Returns val.
function([array idx val] [array idx idx2 & idxv])
Sets the value at the index/indices. Works on arrays of int. Returns val.
function([array idx val] [array idx idx2 & idxv])
Sets the value at the index/indices. Works on arrays of long. Returns val.
function([array idx val] [array idx idx2 & idxv])
Sets the value at the index/indices. Works on arrays of short. Returns val.
function([array idx val] [array idx idx2 & idxv])
Evaluates expression x and throws an AssertionError with optional message if x does not evaluate to logical true. A...
macro([x] [x message])
assoc[iate]. When applied to a map, returns a new map of the same (hashed/sorted) type, that contains the mapping of...
function([map key val] [map key val & kvs])
When applied to a transient map, adds mapping of key(s) to val(s). When applied to a transient vector, sets the val at...
function([coll key val] [coll key val & kvs])
Associates a value in a nested associative structure, where ks is a sequence of keys and v is the new value and return...
function([m [k & ks] v])
Returns true if coll implements Associative
function([coll])
Creates and returns an Atom with an initial value of x and zero or more options (in any order): :meta metadata-map ...
function([x] [x & options])
Blocks the current thread (indefinitely!) until all actions dispatched thus far, from this thread or agent, to the age...
function([& agents])
Blocks the current thread until all actions dispatched thus far (from this thread or agent) to the agents have occurre...
function([timeout-ms & agents])
- function
([a])
B
Returns the immediate superclass and direct interfaces of c, if any
function([c])
Takes a Java object and returns a read-only implementation of the map abstraction based upon its JavaBean properties.
function([x])
Coerce to BigDecimal
function([x])
Coerce to BigInt
function([x])
Coerce to BigInteger
function([x])
binding => var-symbol init-expr Creates new bindings for the (already-existing) vars, with the supplied initial val...
macro([bindings & body])
Bitwise and
function([x y] [x y & more])
Bitwise and with complement
function([x y] [x y & more])
Clear bit at index n
function([x n])
Flip bit at index n
function([x n])
Bitwise complement
function([x])
Bitwise or
function([x y] [x y & more])
Set bit at index n
function([x n])
Bitwise shift left
function([x n])
Bitwise shift right
function([x n])
Test bit at index n
function([x n])
Bitwise exclusive or
function([x y] [x y & more])
Coerce to boolean
function([x])
Creates an array of booleans
function([size-or-seq] [size init-val-or-seq])
Return true if x is a Boolean
function([x])
Casts to boolean[]
function([xs])
Returns a function defined by the given fntail, which will install the same bindings in effect as in the thread at the...
macro([& fntail])
Returns a function, which will install the same bindings in effect as in the thread at the time bound-fn* was called a...
function([f])
Returns true if all of the vars provided as arguments have any bound value, root or thread-local. Implies that deref'...
function([& vars])
If coll is counted? returns its count, else will count at most the first n elements of coll using its seq
function([n coll])
Return a seq of all but the last item in coll, in linear time
function([coll])
Coerce to byte
function([x])
Creates an array of bytes
function([size-or-seq] [size init-val-or-seq])
Casts to bytes[]
function([xs])
Return true if x is a byte array
function([x])
C
Takes an expression, and a set of clauses. Each clause can take the form of either: test-constant result-expr (...
macro([e & clauses])
Throws a ClassCastException if x is not a c, else returns x.
function([c x])
A transducer which concatenates the contents of each input, which must be a collection, into the reduction.
function([rf])
Catch clause inside try.
special-formCoerce to char
function([x])
Creates an array of chars
function([size-or-seq] [size init-val-or-seq])
Returns escape string for char or nil if none
valueReturns name string for char or nil if none
valueReturn true if x is a Character
function([x])
Casts to chars[]
function([xs])
- function
([b])
- function
([b x])
- function
([capacity])
- function
([chunk rest])
- function
([s])
- function
([s])
- function
([s])
- function
([s])
Returns the Class of x
function([x])
Returns true if x is an instance of Class
function([x])
Returns clojure version as a printable string.
function([])
Returns true if x implements IPersistentCollection
function([x])
Ignores body, yields nil
macro([& body])
Must be called in a transaction. Sets the in-transaction-value of ref to: (apply fun in-transaction-value-of-ref ar...
function([ref fun & args])
Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable numb...
function([] [f] [f g] [f g & fs])
Returns an implementation of java.util.Comparator based upon pred.
function([pred])
Comparator. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'gre...
function([x y])
Atomically sets the value of atom to newval if and only if the current value of the atom is identical to oldval. Retur...
function([atom oldval newval])
Compiles the namespace named by the symbol lib into a set of classfiles. The source for the lib must be in a proper ...
function([lib])
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...
function([f])
Takes a reducing function f of 2 args and returns a fn suitable for transduce by adding an arity-1 signature that call...
function([f] [f cf])
Returns a lazy seq representing the concatenation of the elements in the supplied colls.
function([] [x] [x y] [x y & zs])
Takes a set of test/expr pairs. It evaluates each test one at a time. If a test returns logical true, cond evaluates ...
macro([& clauses])
Takes an expression and a set of test/form pairs. Threads expr (via ->) through each form for which the corresponding ...
macro([expr & clauses])
Takes an expression and a set of test/form pairs. Threads expr (via ->>) through each form for which the corresponding...
macro([expr & clauses])
Takes a binary predicate, an expression, and a set of clauses. Each clause can take the form of either: test-expr r...
macro([pred expr & clauses])
conj[oin]. Returns a new collection with the xs 'added'. (conj nil item) returns (item). (conj coll) returns col...
function([] [coll] [coll x] [coll x & xs])
Adds x to the transient collection, and return coll. The 'addition' may happen at different 'places' depending on the ...
function([] [coll] [coll x])
Returns a new seq where x is the first element and seq is the rest.
function([x seq])
Returns a function that takes any number of arguments and returns x.
function([x])
Takes a proxy class and any arguments for its superclass ctor and creates and returns an instance of the proxy.
function([c & ctor-args])
Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed co...
function([coll key])
Returns the number of items in the collection. (count nil) returns 0. Also works on strings, arrays, and Java Collect...
function([coll])
Returns true if coll implements count in constant time
function([coll])
Create a new namespace named by the symbol if one doesn't already exist, returns it or the already-existing namespace ...
function([sym])
Returns a structure basis object.
function([& keys])
Returns a lazy (infinite!) sequence of repetitions of the items in coll.
function([coll])
D
Returns a number one less than num. Does not auto-promote longs, will throw on overflow. See also: dec'
function([x])
Returns a number one less than num. Supports arbitrary precision. See also: dec
function([x])
Returns true if n is a BigDecimal
function([n])
defs the supplied var names with no bindings, useful for making forward declarations.
macro([& names])
Returns a lazy sequence removing consecutive duplicates in coll. Returns a transducer when no collection is provided.
function([] [coll])
Creates and interns a global var.
special-formDefault map of data reader functions provided by Clojure. May be overridden by binding *data-readers*.
valueExperimental - like defmacro, except defines a named function whose body is the expansion, calls to which may be expan...
macro([name & decl])
Creates a new Java interface with the given name and method sigs. The method return types and parameter types may be s...
macro([name & sigs])
Like defn, but the resulting function name is declared as a macro and will be used as a macro by the compiler when it ...
macro([name doc-string? attr-map? [params*] body] [name doc-string? attr-map? ([params*] body) + attr-map?])
Creates and installs a new method of multimethod associated with dispatch-value.
macro([multifn dispatch-val & fn-tail])
Creates a new multimethod with the associated dispatch function. The docstring and attr-map are optional. Options a...
macro([name docstring? attr-map? dispatch-fn & options])
Same as (def name (fn [params* ] exprs*)) or (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added...
macro([name doc-string? attr-map? [params*] prepost-map? body] [name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?])
same as defn, yielding non-public def
macro([name & decls])
defs name to have the root value of the expr iff the named var has no root value, else expr is unevaluated
macro([name expr])
A protocol is a named set of named methods and their signatures: (defprotocol AProtocolName ;optional doc string ...
macro([name & opts+sigs])
(defrecord name [fields*] options* specs*) Options are expressed as sequential keywords and arguments (in any order)...
macro([name [& fields] & opts+specs])
Same as (def name (create-struct keys...))
macro([name & keys])
(deftype name [fields*] options* specs*) Options are expressed as sequential keywords and arguments (in any order). ...
macro([name [& fields] & opts+specs])
Takes a body of expressions and yields a Delay object that will invoke the body only the first time it is forced (with...
macro([& body])
returns true if x is a Delay created with delay
function([x])
Delivers the supplied value to the promise, releasing any pending derefs. A subsequent call to deliver on a promise wi...
function([promise val])
Returns the denominator part of a Ratio.
function([r])
Also reader macro: @ref/@agent/@var/@atom/@delay/@future/@promise. Within a transaction, returns the in-transaction-va...
function([ref] [ref timeout-ms timeout-val])
Establishes a parent/child relationship between parent and tag. Parent must be a namespace-qualified symbol or keyword...
function([tag parent] [h tag parent])
Returns the immediate and indirect children of tag, through a relationship established via derive. h must be a hierarc...
function([tag] [h tag])
- function
([bindings])
disj[oin]. Returns a new set of the same (hashed/sorted) type, that does not contain key(s).
function([set] [set key] [set key & ks])
disj[oin]. Returns a transient set of the same (hashed/sorted) type, that does not contain key(s).
function([set] [set key] [set key & ks])
dissoc[iate]. Returns a new map of the same (hashed/sorted) type, that does not contain a mapping for key(s).
function([map] [map key] [map key & ks])
Returns a transient map that doesn't contain a mapping for key(s).
function([map key] [map key & ks])
Returns a lazy sequence of the elements of coll with duplicates removed. Returns a stateful transducer when no collect...
function([] [coll])
Returns true if no two of the arguments are =
function([x] [x y] [x y & more])
Evaluates expressions in order, returning the last.
special-formWhen lazy sequences are produced via functions that have side effects, any effects other than those needed to produce ...
function([coll] [n coll])
When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce ...
function([coll] [n coll])
Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by "for". Does not ret...
macro([seq-exprs & body])
Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls. Starts a transaction...
macro([& exprs])
bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 throug...
macro([bindings & body])
Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given argumen...
macro([x & forms])
Coerce to double
function([x])
Creates an array of doubles
function([size-or-seq] [size init-val-or-seq])
Return true if x is a Double
function([x])
Casts to double[]
function([xs])
Returns a laziness-preserving sequence of all but the first n items in coll. Returns a stateful transducer when no col...
function([n] [n coll])
Return a lazy sequence of all but the last n (default 1) items in coll
function([coll] [n coll])
Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical false....
function([pred] [pred coll])
E
- value
Returns a reducible/iterable application of the transducers to the items in coll. Transducers are applied in order as ...
function([xform* coll])
Returns an empty collection of the same category as coll, or nil
function([coll])
Returns true if coll has no items. To check the emptiness of a seq, please use the idiom (seq x) rather than (not (emp...
function([coll])
Must be called in a transaction. Protects the ref from modification by other transactions. Returns the in-transaction...
function([ref])
If x is already reduced?, returns it, else returns (reduced x)
function([x])
Returns a seq on a java.util.Enumeration
function([e])
Returns the error-handler of agent a, or nil if there is none. See set-error-handler!
function([a])
Returns the error-mode of agent a. See set-error-mode!
function([a])
Evaluates the form data structure (not text!) and returns the result.
function([form])
Returns true if n is even, throws an exception if n is not an integer
function([n])
Takes a set of predicates and returns a function f that returns true if all of its composing predicates return a logic...
function([p] [p1 p2] [p1 p2 p3] [p1 p2 p3 & ps])
Returns true if (pred x) is logical true for every x in coll, else false.
function([pred coll])
Returns the cause of ex if ex is a Throwable. Otherwise returns nil.
function([ex])
Returns exception data (a map) if ex is an IExceptionInfo. Otherwise returns nil.
function([ex])
Create an instance of ExceptionInfo, a RuntimeException subclass that carries a map of additional data.
function([msg map] [msg map cause])
Returns the message attached to ex if ex is a Throwable. Otherwise returns nil.
function([ex])
Implementations of protocol methods can be provided using the extend construct: (extend AType AProtocol {:fo...
function([atype & proto+mmaps])
Useful when you want to provide several implementations of the same protocol all at once. Takes a single protocol and ...
macro([p & specs])
A macro that expands into an extend call. Useful when you are supplying the definitions explicitly inline, extend-type...
macro([t & specs])
Returns a collection of the types explicitly extending protocol
function([protocol])
Returns true if atype extends protocol
function([protocol atype])
F
Returns true if x is the value false, false otherwise.
function([x])
Same as (first (first x))
function([x])
A tree seq on java.io.Files
function([dir])
Returns a lazy sequence of the items in coll for which (pred item) returns logical true. pred must be free of side-eff...
function([pred] [pred coll])
Returns a vector of the items in coll for which (pred item) returns logical true. pred must be free of side-effects.
function([pred coll])
Finally clause inside try, runs on exit.
special-formReturns the map entry for key, or nil if key not present.
function([map key])
Returns a Keyword with the given namespace and name if one already exists. This function will not intern a new keywor...
function([name] [ns name])
Returns the namespace named by the symbol or nil if it doesn't exist.
function([sym])
- function
([protocol x])
- function
([protocol methodk x])
Returns the global var named by the namespace-qualified symbol, or nil if no var with that name.
function([sym])
Returns the first item in the collection. Calls seq on its argument. If coll is nil, returns nil.
function([coll])
Takes any nested combination of sequential things (lists, vectors, etc.) and returns their contents as a single, flat ...
function([x])
Coerce to float
function([x])
Creates an array of floats
function([size-or-seq] [size init-val-or-seq])
Returns true if n is a floating point number
function([n])
Casts to float[]
function([xs])
Flushes the output stream that is the current value of *out*
function([])
params => positional-params*, or positional-params* & rest-param positional-param => binding-form rest-param => bind...
macro([& sigs])
Returns true if x implements Fn, i.e. is an object created via fn.
function([x])
Same as (first (next x))
function([x])
Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x...
function([f x] [f x y] [f x y z])
List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more ...
macro([seq-exprs body-expr])
If x is a Delay, returns the (possibly cached) value of its expression, else returns x
function([x])
Formats a string using java.lang.String.format, see java.util.Formatter for format string syntax
function([fmt & args])
Returns a map from distinct items in coll to the number of times they appear.
function([coll])
Takes a body of expressions and yields a future object that will invoke the body in another thread, and will cache the...
macro([& body])
Takes a function of no args and yields a future object that will invoke the function in another thread, and will cache...
function([f])
Cancels the future, if possible.
function([f])
Returns true if future f is cancelled
function([f])
Returns true if future f is done
function([f])
Returns true if x is a future
function([x])
G
When compiling, generates compiled bytecode for a class with the given package-qualified :name (which, as all names in...
macro([& options])
When compiling, generates compiled bytecode for an interface with the given package-qualified :name (which, as all nam...
macro([& options])
Returns a new symbol with a unique name. If a prefix string is supplied, the name is prefix# where # is some unique nu...
function([] [prefix-string])
Returns the value mapped to key, not-found or nil if key not present in associative collection, set, string, array, or...
function([map key] [map key not-found])
Returns the value in a nested associative structure, where ks is a sequence of keys. Returns nil if the key is not p...
function([m ks] [m ks not-found])
Given a multimethod and a dispatch value, returns the dispatch fn that would apply to that value, or nil if none apply...
function([multifn dispatch-val])
Takes an optional single class followed by zero or more interfaces. If not supplied class defaults to Object. Creates...
function([& bases])
Get a map with the Var/value pairs which is currently in effect for the current thread.
function([])
Gets the validator-fn for a var/ref/agent/atom.
function([iref])
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...
function([f coll])
H
Returns a transducer that ends transduction when pred returns true for an input. When retf is supplied it must be a fn...
function([pred] [pred retf])
Returns the hash code of its argument. Note this is the hash code consistent with =, and thus is different than .hashC...
function([x])
- function
([x y])
keyval => key val Returns a new hash map with supplied mappings. If any keys are equal, they are handled as if by r...
function([] [& keyvals])
Returns the hash code, consistent with =, for an external ordered collection implementing Iterable. See http://clo...
function([coll])
Returns a new hash set with supplied keys. Any equal keys are handled as if by repeated uses of conj.
function([] [& keys])
Returns the hash code, consistent with =, for an external unordered collection implementing Iterable. For maps, the i...
function([coll])
I
- value
Return true if x is a symbol or keyword
function([x])
Tests if 2 arguments are the same object
function([x y])
Returns its argument.
function([x])
Evaluates test, then consequent or alternative.
special-formbindings => binding-form test If test is true, evaluates then with binding-form bound to the value of test, if not...
macro([bindings then] [bindings then else & oldform])
Evaluates test. If logical false, evaluates and returns then expr, otherwise else expr, if supplied, else nil.
macro([test then] [test then else])
bindings => binding-form test If test is not nil, evaluates then with binding-form bound to the value of test, if...
macro([bindings then] [bindings then else & oldform])
Returns true if x implements IFn. Note that many data structures (e.g. sets and maps) implement IFn
function([x])
import-list => (package-symbol class-name-symbols*) For each name in class-name-symbols, adds a mapping from name to ...
macro([& import-symbols-or-lists])
Sets *ns* to the namespace named by the symbol, creating it if needed.
value([name])
Returns a number one greater than num. Does not auto-promote longs, will throw on overflow. See also: inc'
function([x])
Returns a number one greater than num. Supports arbitrary precision. See also: inc
function([x])
Return true if coll implements Indexed, indicating efficient lookup by index
function([coll])
Returns true if num is negative or positive infinity, else false
function([num])
Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces)...
function([proxy mappings])
Return the number of milliseconds since January 1, 1970, 00:00:00 GMT
function([inst])
- protocol-method
([inst])
Return true if x satisfies Inst
function([x])
Evaluates x and tests if it is an instance of the class c. Returns true or false
function([c x])
Coerce to int
function([x])
Creates an array of ints
function([size-or-seq] [size init-val-or-seq])
Return true if x is a fixed precision integer
function([x])
Returns true if n is an integer
function([n])
Returns a lazy seq of the first item in each coll, then the second etc.
function([] [c1] [c1 c2] [c1 c2 & colls])
Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting it...
function([ns name] [ns name val])
Returns a lazy seq of the elements of coll separated by sep. Returns a stateful transducer when no collection is provi...
function([sep] [sep coll])
Returns a new coll consisting of to with all of the items of from conjoined. A transducer may be supplied. (into x) ...
function([] [to] [to from] [to xform from])
Returns an array with components set to the values in aseq. The array's component type is type if provided, or the typ...
function([aseq] [type aseq])
Casts to int[]
function([xs])
If an io! block occurs in a transaction, throws an IllegalStateException, else runs body in an implicit do. If the f...
macro([& body])
Returns true if (= child parent), or child is directly or indirectly derived from parent, either via a Java type inher...
function([child parent] [h child parent])
Returns a lazy (infinite!) sequence of x, (f x), (f (f x)) etc. f must be free of side-effects
function([f x])
Creates a seqable/reducible via repeated calls to step, a function of some (continuation token) 'k'. The first call to...
function([step & {:keys [somef vf kf initk], :or {vf identity, kf identity, somef some?, initk nil}}])
Returns a seq on a java.util.Iterator. Note that most collections providing iterators implement Iterable and thus supp...
function([iter])
J
Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable nu...
function([f] [f g] [f g h] [f g h & fs])
K
Returns a lazy sequence of the non-nil results of (f item). Note, this means false return values will be included. f ...
function([f] [f coll])
Returns a lazy sequence of the non-nil results of (f index item). Note, this means false return values will be include...
function([f] [f coll])
Returns the key of the map entry.
function([e])
Returns a sequence of the map's keys, in the same order as (seq map).
function([map])
Returns a Keyword with the given namespace and name. Do not use : in the keyword strings, it will be added automatica...
function([name] [ns name])
Return true if x is a Keyword
function([x])
L
Return the last item in coll, in linear time
function([coll])
Expands to code which yields a lazy sequence of the concatenation of the supplied colls. Each coll expr is not evalua...
macro([& colls])
Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only th...
macro([& body])
binding => binding-form init-expr binding-form => name, or destructuring-form destructuring-form => map-destructure-...
macro([bindings & body])
fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+) Takes a vector of function specs and a body, and gen...
macro([fnspecs & body])
Returns the lines of text from rdr as a lazy sequence of strings. rdr must implement java.io.BufferedReader.
function([rdr])
Creates a new list containing the items.
function([& items])
Creates a new seq containing the items prepended to the rest, the last of which will be treated as a sequence.
function([args] [a args] [a b args] [a b c args] [a b c d & more])
Returns true if x implements IPersistentList
function([x])
Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash ...
function([& paths])
Sequentially read and evaluate the set of forms contained in the file.
value([name])
Sequentially read and evaluate the set of forms contained in the stream/file
function([rdr])
Sequentially read and evaluate the set of forms contained in the string
function([s])
Returns a sorted set of symbols naming the currently loaded libs
function([])
Executes exprs in an implicit do, while holding the monitor of x. Will release the monitor of x in all circumstances.
macro([x & body])
Coerce to long
function([x])
Creates an array of longs
function([size-or-seq] [size init-val-or-seq])
Casts to long[]
function([xs])
Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-...
macro([bindings & body])
M
Repeatedly calls macroexpand-1 on form until it no longer represents a macro form, then returns it. Note neither ma...
function([form])
If form represents a macro form, returns its expansion, else returns form.
function([form])
Creates and returns an array of instances of the specified class of the specified dimension(s). Note that a class obj...
function([type len] [type dim & more-dims])
Creates a hierarchy object for use with derive, isa? etc.
function([])
Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by app...
function([f] [f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls])
Return true if x is a map entry
function([x])
Returns a lazy sequence consisting of the result of applying f to 0 and the first item of coll, followed by applying f...
function([f] [f coll])
Return true if x implements IPersistentMap
function([x])
Returns the result of applying concat to the result of applying map to f and colls. Thus function f should return a c...
function([f] [f & colls])
Returns a vector consisting of the result of applying f to the set of first items of each coll, followed by applying f...
function([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls])
Returns the greatest of the nums.
function([x] [x y] [x y & more])
Returns the x for which (k x), a number, is greatest. If there are multiple such xs, the last one is returned.
function([k x] [k x y] [k x y & more])
Expands into code that creates a fn that expects to be passed an object and any args and calls the named instance meth...
macro([name & args])
Returns a memoized version of a referentially transparent function. The memoized version of the function keeps a cache...
function([f])
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...
function([& maps])
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...
function([f & maps])
Returns the metadata of obj, returns nil if there is no metadata.
function([obj])
- function
([meth])
Given a multimethod, returns a map of dispatch values -> dispatch fns
function([multifn])
Returns the least of the nums.
function([x] [x y] [x y & more])
Returns the x for which (k x), a number, is least. If there are multiple such xs, the last one is returned.
function([k x] [k x y] [k x y & more])
Mix final collection hash for ordered or unordered collections. hash-basis is the combined collection hash, count is ...
function([hash-basis count])
Modulus of num and div. Truncates toward negative infinity.
function([num div])
Acquires the monitor of an object.
special-formReleases the monitor of an object.
special-form- function
([s])
N
Returns true if num is NaN, else false
function([num])
Returns the name String of a string, symbol or keyword.
function([x])
Returns the namespace String of a symbol or keyword, or nil if not present.
function([x])
Convert a Clojure namespace name to a legal Java package name.
function([ns])
Return true if x is a non-negative fixed precision integer
function([x])
Return true if x is a negative fixed precision integer
function([x])
Returns true if num is less than zero, else false
function([num])
Creates a new instance of a class.
special-formWrites a platform-specific newline to *out*
function([])
Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil.
function([coll])
Same as (next (first x))
function([x])
Returns true if x is nil, false otherwise.
function([x])
Same as (next (next x))
function([x])
Returns true if x is logical false, false otherwise.
function([x])
Returns false if (pred x) is logical true for any x in coll, else true.
function([pred coll])
If coll is empty, returns nil, else coll
function([coll])
Returns false if (pred x) is logical true for every x in coll, else true.
function([pred coll])
Same as (not (= obj1 obj2))
function([x] [x y] [x y & more])
Sets *ns* to the namespace named by name (unevaluated), creating it if needed. references can be zero or more of: (:r...
macro([name docstring? attr-map? references*])
Returns a map of the aliases for the namespace.
function([ns])
Returns a map of the import mappings for the namespace.
function([ns])
Returns a map of the intern mappings for the namespace.
function([ns])
Returns a map of all the mappings for the namespace.
function([ns])
Returns the name of the namespace, a symbol.
function([ns])
Returns a map of the public intern mappings for the namespace.
function([ns])
Returns a map of the refer mappings for the namespace.
function([ns])
Returns the var or Class to which a symbol will be resolved in the namespace (unless found in the environment), else n...
function([ns sym] [ns env sym])
Removes the alias for the symbol from the namespace.
function([ns sym])
Removes the mappings for the symbol from the namespace.
function([ns sym])
Returns the value at the index. get returns nil if index out of bounds, nth throws an exception unless not-found is su...
function([coll index] [coll index not-found])
Returns the nth next of coll, (seq coll) when n is 0.
function([coll n])
Returns the nth rest of coll, coll when n is 0.
function([coll n])
Coerce to Number
function([x])
Returns true if x is a Number
function([x])
Returns the numerator part of a Ratio.
function([r])
O
Creates an array of objects
function([size-or-seq])
Returns true if n is odd, throws an exception if n is not an integer
function([n])
Evaluates exprs one at a time, from left to right. If a form returns a logical true value, or returns that value and d...
macro([] [x] [x & next])
P
implements java.io.PrintWriter given flush-fn, which will be called when .flush() is called, with a string built up si...
function([flush-fn close-fn] [flush-fn close-fn autoflush?])
Returns the immediate parents of tag, either via a Java type inheritance relationship or a relationship established vi...
function([tag] [h tag])
Parse strings "true" or "false" and return a boolean, or nil if invalid
function([s])
Parse string with floating point components and return a Double value, or nil if parse fails. Grammar: https://docs...
function([s])
Parse string of decimal digits with optional leading -/+ and return a Long value, or nil if parse fails
function([s])
Parse a string representing a UUID and return a java.util.UUID instance, or nil if parse fails. Grammar: https://do...
function([s])
Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of addition...
function([f] [f arg1] [f arg1 arg2] [f arg1 arg2 arg3] [f arg1 arg2 arg3 & more])
Returns a lazy sequence of lists of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e. ...
function([n coll] [n step coll] [n step pad coll])
Returns a lazy sequence of lists like partition, but may include partitions with fewer than n items at the end. Retur...
function([n] [n coll] [n step coll])
Applies f to each value in coll, splitting it each time f returns a new value. Returns a lazy seq of partitions. Re...
function([f] [f coll])
Returns a lazy sequence of vectors of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e...
function([n coll] [n step coll] [n step pad coll])
Returns a lazy sequence of vector partitions, but may include partitions with fewer than n items at the end. Returns...
function([n] [n coll] [n step coll])
Executes the no-arg fns in parallel, returning a lazy sequence of their values
function([& fns])
For a list or queue, same as first, for a vector, same as, but much more efficient than, last. If the collection is em...
function([coll])
Returns a new, persistent version of the transient collection, in constant time. The transient collection cannot be us...
function([coll])
Like map, except f is applied in parallel. Semi-lazy in that the parallel computation stays ahead of the consumption, ...
function([f coll] [f coll & colls])
For a list or queue, returns a new list/queue without the first item, for a vector, returns a new vector without the l...
function([coll])
Removes the last item from a transient vector. If the collection is empty, throws an exception. Returns coll
function([coll])
Pop one set of bindings pushed with push-binding before. It is an error to pop bindings without pushing before.
function([])
Return true if x is a positive fixed precision integer
function([x])
Returns true if num is greater than zero, else false
function([num])
Prints the object(s) to the output stream that is the current value of *out*. Prints the object(s), separated by spac...
function([] [x] [x & more])
pr to a string, returning it
function([& xs])
Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y when there is a conflict
function([multifn dispatch-val-x dispatch-val-y])
Given a multimethod, returns a map of preferred value -> set of other values
function([multifn])
- value
Prints the object(s) to the output stream that is the current value of *out*. print and println produce output for hu...
function([& more])
- function
([o print-args w])
- multimethod
- multimethod
- function
([o w])
print to a string, returning it
function([& xs])
Prints formatted output, as per format
function([fmt & args])
Same as print followed by (newline)
function([& more])
println to a string, returning it
function([& xs])
Same as pr followed by (newline). Observes *flush-on-newline*
function([& more])
prn to a string, returning it
function([& xs])
Returns a promise object that can be read with deref/@, and set, once only, with deliver. Calls to deref/@ prior to de...
function([])
class-and-interfaces - a vector of class names args - a (possibly empty) vector of arguments to the superclass cons...
macro([class-and-interfaces args & fs])
- function
([call this meth])
Takes a proxy instance and returns the proxy's fn map.
function([proxy])
- function
([super interfaces])
Use to call a superclass method in the body of a proxy method. Note, expansion captures 'this
macro([meth & args])
WARNING: This is a low-level function. Prefer high-level macros like binding where ever possible. Takes a map of Va...
function([bindings])
Returns a lazy sequence of the values of the exprs, which are evaluated in parallel
macro([& exprs])
Q
Return true if x is a symbol or keyword with a namespace
function([x])
Return true if x is a keyword with a namespace
function([x])
Return true if x is a symbol with a namespace
function([x])
quot[ient] of dividing numerator by denominator.
function([num div])
Yields the unevaluated form.
special-form
R
Returns a random floating point number between 0 (inclusive) and n (default 1) (exclusive).
function([] [n])
Returns a random integer between 0 (inclusive) and n (exclusive).
function([n])
Return a random element of the (sequential) collection. Will have the same performance characteristics as nth for the ...
function([coll])
Returns items from coll with random probability of prob (0.0 - 1.0). Returns a transducer when no collection is provi...
function([prob] [prob coll])
Returns a pseudo-randomly generated java.util.UUID instance (i.e. type 4). See: https://docs.oracle.com/javase/8/docs...
function([])
Returns a lazy seq of nums from start (inclusive) to end (exclusive), by step, where start defaults to 0, step to 1, a...
function([] [end] [start end] [start end step])
Returns true if n is a Ratio
function([n])
Returns true if n is a rational number
function([n])
returns the rational value of num
function([num])
Returns the next regex match, if any, of string to pattern, using java.util.regex.Matcher.find(). Uses re-groups to r...
function([m] [re s])
Returns the groups from the most recent match/find. If there are no nested groups, returns a string of the entire matc...
function([m])
Returns an instance of java.util.regex.Matcher, for use, e.g. in re-find.
function([re s])
Returns the match, if any, of string to pattern, using java.util.regex.Matcher.matches(). Uses re-groups to return th...
function([re s])
Returns an instance of java.util.regex.Pattern, for use, e.g. in re-matcher.
function([s])
Returns a lazy sequence of successive matches of pattern in string, using java.util.regex.Matcher.find(), each such ma...
function([re s])
Reads the next object from stream, which must be an instance of java.io.PushbackReader or some derivee. stream defaul...
function([] [stream] [stream eof-error? eof-value] [stream eof-error? eof-value recursive?] [opts stream])
Like read, and taking the same args. stream must be a LineNumberingPushbackReader. Returns a vector containing the obj...
function([] [stream] [stream eof-error? eof-value] [stream eof-error? eof-value recursive?] [opts stream])
Reads the next line from stream that is the current value of *in* .
function([])
Reads one object from the string s. Optionally include reader options, as specified in read. Note that read-string ...
function([s] [opts s])
Construct a data representation of a reader conditional. If true, splicing? indicates read-cond-splicing.
function([form splicing?])
Return true if the value is the data representation of a reader conditional
function([value])
Returns true if a value has been produced for a promise, delay, future or lazy sequence.
function([x])
Returns true if x is a record
function([x])
Rebinds and transfers control to the recursion point.
special-formf should be a function of 2 arguments. If val is not supplied, returns the result of applying f to the first 2 items i...
function([f coll] [f val coll])
Reduces an associative collection. f should be a function of 3 arguments. Returns the result of applying f to init, th...
function([f init coll])
Wraps x in a way such that a reduce will terminate with the value x
function([x])
Returns true if x is the result of a call to reduced
function([x])
Returns a lazy seq of the intermediate values of the reduction (as per reduce) of coll by f, starting with init.
function([f coll] [f init coll])
Creates and returns a Ref with an initial value of x and zero or more options (in any order): :meta metadata-map ...
function([x] [x & options])
Returns the history count of a ref
function([ref])
Gets the max-history of a ref, or sets it and returns the ref
function([ref] [ref n])
Gets the min-history of a ref, or sets it and returns the ref
function([ref] [ref n])
Must be called in a transaction. Sets the value of ref. Returns val.
function([ref val])
refers to all public vars of ns, subject to filters. filters can include at most one each of: :exclude list-of-symb...
function([ns-sym & filters])
Same as (refer 'clojure.core <filters>)
macro([& filters])
reify creates an object implementing a protocol or interface. reify is a macro with the following structure: (reify ...
macro([& opts+specs])
Normally, actions sent directly or indirectly during another action are held until the action completes (changes the a...
function([])
remainder of dividing numerator by denominator.
function([num div])
Returns a lazy sequence of the items in coll for which (pred item) returns logical false. pred must be free of side-ef...
function([pred] [pred coll])
Removes all of the methods of multimethod.
function([multifn])
Removes the method of multimethod associated with dispatch-value.
function([multifn dispatch-val])
Removes the namespace named by the symbol. Use with caution. Cannot be used to remove the clojure namespace.
function([sym])
Remove f from the tap set.
function([f])
Removes a watch (set by add-watch) from a reference
function([reference key])
Returns a lazy (infinite!, or length n if supplied) sequence of xs.
function([x] [n x])
Takes a function of no args, presumably with side effects, and returns an infinite (or length n if supplied) lazy sequ...
function([f] [n f])
Given a map of replacement pairs and a vector/collection, returns a vector/seq with any elements = a key in smap repla...
function([smap] [smap coll])
Loads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib, a prefix li...
function([& args])
Resolves namespace-qualified sym per 'resolve'. If initial resolve fails, attempts to require sym's namespace and retrie...
function([sym])
Sets the value of atom to newval without regard for the current value. Returns newval.
function([atom newval])
Atomically resets the metadata for a namespace/var/ref/agent/atom
function([iref metadata-map])
Sets the value of atom to newval. Returns [old new], the value of the atom before and after the reset.
function([atom newval])
same as (ns-resolve *ns* symbol) or (ns-resolve *ns* &env symbol)
function([sym] [env sym])
Returns a possibly empty seq of the items after the first. Calls seq on its argument.
function([coll])
When an agent is failed, changes the agent state to new-state and then un-fails the agent so that sends are allowed ag...
function([a new-state & options])
Creates and returns a lazy sequence of structmaps corresponding to the rows in the java.sql.ResultSet rs
function([rs])
Returns a seq of the items in coll in reverse order. Not lazy.
function([coll])
Returns true if coll implements Reversible
function([coll])
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...
function([rev])
sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a reverse seq of those entries with keys ek for...
function([sc test key] [sc start-test start-key end-test end-key])
Runs the supplied procedure (via reduce), for purposes of side effects, on successive items in the collection. Returns...
function([proc coll])
S
Constructs a data representation for a StackTraceElement: [class method file line]
function([o])
Returns true if x satisfies the protocol
function([protocol x])
Same as (first (next x))
function([x])
Returns a map containing only those entries in map whose key is in keys
function([map keyseq])
Dispatch an action to an agent. Returns the agent immediately. Subsequently, in a thread from a thread pool, the state...
function([a f & args])
Dispatch a potentially blocking action to an agent. Returns the agent immediately. Subsequently, in a separate thread,...
function([a f & args])
Dispatch an action to an agent. Returns the agent immediately. Subsequently, in a thread supplied by executor, the sta...
function([executor a f & args])
Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on ...
function([coll])
Builds a map from a seq as described in https://clojure.org/reference/special_forms#keyword-arguments
function([s])
Return true if x implements ISeq
function([x])
Return true if the seq function is supported for x
function([x])
Creates a queued seq on another (presumably lazy) seq s. The queued seq will produce a concrete seq in the background,...
function([s] [n-or-q s])
Coerces coll to a (possibly empty) sequence, if it is not already one. Will not force a lazy seq. (sequence nil) yield...
function([coll] [xform coll] [xform coll & colls])
Returns true if coll implements Sequential
function([coll])
Returns a set of the distinct elements of coll.
function([coll])
Assigns a new value to a var or field.
special-formSets the ExecutorService to be used by send
function([executor])
Sets the ExecutorService to be used by send-off
function([executor])
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...
function([a handler-fn])
Sets the error-mode of agent a to mode-keyword, which must be either :fail or :continue. If an action being run by th...
function([a mode-keyword])
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...
function([iref validator-fn])
Returns true if x implements IPersistentSet
function([x])
Coerce to short
function([x])
Creates an array of shorts
function([size-or-seq] [size init-val-or-seq])
Casts to shorts[]
function([xs])
Return a random permutation of coll
function([coll])
Initiates a shutdown of the thread pools that back the agent system. Running actions will complete, but no new actions...
function([])
Return true if x is a symbol or keyword without a namespace
function([x])
Return true if x is a keyword without a namespace
function([x])
Return true if x is a symbol without a namespace
function([x])
Opens a reader on f and reads all its contents, returning a string. See clojure.java.io/reader for a complete list of ...
function([f & opts])
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...
function([pred coll])
When expr is not nil, threads it into the first form (via ->), and when that result is not nil, through the next etc
macro([expr & forms])
When expr is not nil, threads it into the first form (via ->>), and when that result is not nil, through the next etc
macro([expr & forms])
Takes a set of predicates and returns a function f that returns the first logical true value returned by one of its co...
function([p] [p1 p2] [p1 p2 p3] [p1 p2 p3 & ps])
Returns true if x is not nil, false otherwise.
function([x])
Returns a sorted sequence of the items in coll. If no comparator is supplied, uses compare. comparator must implement...
function([coll] [comp coll])
Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). If no c...
function([keyfn coll] [keyfn comp coll])
keyval => key val Returns a new sorted map with supplied mappings. If any keys are equal, they are handled as if by...
function([& keyvals])
keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator. If any keys are e...
function([comparator & keyvals])
Returns a new sorted set with supplied keys. Any equal keys are handled as if by repeated uses of conj.
function([& keys])
Returns a new sorted set with supplied keys, using the supplied comparator. Any equal keys are handled as if by repea...
function([comparator & keys])
Returns true if coll implements Sorted
function([coll])
Returns true if s names a special form
function([s])
Opposite of slurp. Opens f with writer, writes content, then closes f. Options passed to clojure.java.io/writer.
function([f content & options])
Returns a vector of [(take n coll) (drop n coll)]
function([n coll])
Returns a vector of [(take-while pred coll) (drop-while pred coll)]
function([pred coll])
Returns a vector of [(into [] (take n) coll) (drop n coll)]
function([n coll])
With no args, returns the empty string. With one arg x, returns x.toString(). (str nil) returns the empty string. Wit...
function([] [x] [x & ys])
Returns a new coll consisting of coll with all of the items of the stream conjoined. This is a terminal operation on t...
function([to stream] [to xform stream])
Works like reduce but takes a java.util.stream.BaseStream as its source. Honors 'reduced', is a terminal operation on ...
function([f s] [f init s])
Takes a java.util.stream.BaseStream instance s and returns a seq of its contents. This is a terminal operation on the ...
function([stream])
Works like transduce but takes a java.util.stream.BaseStream as its source. This is a terminal operation on the stream...
function([xform f stream] [xform f init stream])
Return true if x is a String
function([x])
Returns a new structmap instance with the keys of the structure-basis. vals must be supplied for basis keys in order -...
function([s & vals])
Returns a new structmap instance with the keys of the structure-basis. keyvals may contain all, some or none of the ba...
function([s & inits])
Returns the substring of s beginning at start inclusive, and ending at end (defaults to length of string), exclusive.
function([s start] [s start end])
sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a seq of those entries with keys ek for which...
function([sc test key] [sc start-test start-key end-test end-key])
Returns a persistent vector of the items in vector from start (inclusive) to end (exclusive). If end is not supplied,...
function([v start] [v start end])
Returns the immediate and indirect superclasses and interfaces of c, if any
function([class])
Atomically swaps the value of atom to be: (apply f current-value-of-atom args). Note that f may be called multiple t...
function([atom f] [atom f x] [atom f x y] [atom f x y & args])
Atomically swaps the value of atom to be: (apply f current-value-of-atom args). Note that f may be called multiple t...
function([atom f] [atom f x] [atom f x y] [atom f x y & args])
Returns a Symbol with the given namespace and name. Arity-1 works on strings, keywords, and vars.
function([name] [ns name])
Return true if x is a Symbol
function([x])
transaction-flags => TBD, pass nil for now Runs the exprs (in an implicit do) in a transaction that encompasses exp...
macro([flags-ignored-for-now & body])
T
Constructs a data representation for a Throwable with keys: :cause - root cause message :phase - error phase ...
function([o])
Construct a data representation of a tagged literal from a tag symbol and a form.
function([tag form])
Return true if the value is the data representation of a tagged literal
function([value])
Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n. Returns a stateful tran...
function([n] [n coll])
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...
function([n coll])
Returns a lazy seq of every nth item in coll. Returns a stateful transducer when no collection is provided.
function([n] [n coll])
Returns a lazy sequence of successive items from coll while (pred item) returns logical true. pred must be free of sid...
function([pred] [pred coll])
sends x to any taps. Will not block. Returns true if there was room in the queue, false if not (dropped).
function([x])
test [v] finds fn at key :test in var metadata and calls it, presuming failure will throw exception
function([v])
If passed a namespace, returns it. Else, when passed a symbol, returns the namespace named by it, throwing an exceptio...
function([x])
Returns true if all of the vars provided as arguments have thread-local bindings. Implies that set!'ing the provided ...
function([& vars])
Throws an instance of Throwable.
special-formEvaluates expr and prints the time it took. Returns the value of expr.
macro([expr])
Returns an array of Objects containing the contents of coll, which can be any Collection. Maps to java.util.Collectio...
function([coll])
Returns a (potentially-ragged) 2-dimensional array of Objects containing the contents of coll, which can be any Collec...
function([coll])
trampoline can be used to convert algorithms requiring mutual recursion without stack consumption. Calls f with suppli...
function([f] [f & args])
reduce with a transformation of f (xf). If init is not supplied, (f) will be called to produce it. f should be a reduc...
function([xform f coll] [xform f init coll])
Returns a new, transient version of the collection, in constant time. Transients support a parallel set of 'changing'...
function([coll])
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 ...
function([branch? children root])
Returns true if x is the value true, false otherwise.
function([x])
try / catch / finally exception handling.
special-formReturns the :type metadata of x, or its Class if none
function([x])
U
Returns the sum of x and y, both long. Note - uses a primitive operator subject to overflow.
function([x y])
Returns the sum of x and y, both int. Note - uses a primitive operator subject to overflow.
function([x y])
Coerce to byte. Subject to rounding or truncation.
function([x])
Coerce to char. Subject to rounding or truncation.
function([x])
Returns a number one less than x, a long. Note - uses a primitive operator subject to overflow.
function([x])
Returns a number one less than x, an int. Note - uses a primitive operator subject to overflow.
function([x])
Returns the division of x by y, both int. Note - uses a primitive operator subject to truncation.
function([x y])
Coerce to double. Subject to rounding.
function([x])
Coerce to float. Subject to rounding.
function([x])
Returns a number one greater than x, a long. Note - uses a primitive operator subject to overflow.
function([x])
Returns a number one greater than x, an int. Note - uses a primitive operator subject to overflow.
function([x])
Coerce to int. Subject to rounding or truncation.
function([x])
Coerce to long. Subject to rounding or truncation.
function([x])
Returns the product of x and y, both long. Note - uses a primitive operator subject to overflow.
function([x y])
Returns the product of x and y, both int. Note - uses a primitive operator subject to overflow.
function([x y])
Returns the negation of x, a long. Note - uses a primitive operator subject to overflow.
function([x])
Returns the negation of x, an int. Note - uses a primitive operator subject to overflow.
function([x])
Returns the remainder of division of x by y, both int. Note - uses a primitive operator subject to truncation.
function([x y])
Coerce to short. Subject to rounding or truncation.
function([x])
Returns the difference of x and y, both long. Note - uses a primitive operator subject to overflow.
function([x y])
Returns the difference of x and y, both int. Note - uses a primitive operator subject to overflow.
function([x y])
Removes a parent/child relationship between parent and tag. h must be a hierarchy obtained from make-hierarchy, if not...
function([tag parent] [h tag parent])
- value
- value
If x is reduced?, returns (deref x), else returns x
function([x])
Bitwise shift right, without sign-extension.
function([x n])
'Updates' a value in an associative structure, where k is a key and f is a function that will take the old value and...
function([m k f] [m k f x] [m k f x y] [m k f x y z] [m k f x y z & more])
'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take...
function([m ks f & args])
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...
function([m f])
Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces)...
function([proxy mappings])
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...
function([m f])
Return true if x is a java.net.URI
function([x])
Like 'require, but also refers to each lib's namespace using clojure.core/refer. Use :use in the ns macro in preferenc...
function([& args])
Return true if x is a java.util.UUID
function([x])
V
Returns the value in the map entry.
function([e])
Returns a sequence of the map's values, in the same order as (seq map).
function([map])
Resolves a symbol to its Var object.
special-formGets the value in the var object
function([x])
Sets the value in the var object to val. The var must be thread-locally bound.
function([x val])
Returns true if v is of type clojure.lang.Var
function([v])
Returns an object of the same type and value as obj, with (apply f (meta obj) args) as its metadata.
function([obj f & args])
Creates a new vector containing the contents of coll. Java arrays will be aliased and should not be modified.
function([coll])
Creates a new vector containing the args.
function([] [a] [a b] [a b c] [a b c d] [a b c d e] [a b c d e f] [a b c d e f & args])
Creates a new vector of a single primitive type t, where t is one of :int :long :float :double :byte :short :char or :...
function([t] [t & elements])
Return true if x implements IPersistentVector
function([x])
Creates and returns a Volatile with an initial value of val.
function([val])
Returns true if x is a volatile.
function([x])
Sets the value of volatile to newval without regard for the current value. Returns newval.
function([vol newval])
Non-atomically swaps the value of the volatile as if: (apply f current-value-of-vol args). Returns the value that ...
macro([vol f & args])
W
Evaluates test. If logical true, evaluates body in an implicit do.
macro([test & body])
bindings => x xs Roughly the same as (when (seq xs) (let [x (first xs)] body)) but xs is evaluated only once
macro([bindings & body])
bindings => binding-form test When test is true, evaluates body with binding-form bound to the value of test
macro([bindings & body])
Evaluates test. If logical false, evaluates body in an implicit do.
macro([test & body])
bindings => binding-form test When test is not nil, evaluates body with binding-form bound to the value of test
macro([bindings & body])
Repeatedly executes body while test expression is true. Presumes some side-effect will cause test to become false/nil....
macro([test & body])
Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. Then execu...
macro([binding-map & body])
Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. Then calls...
function([binding-map f & args])
Evaluates body in a context in which *in* is bound to a fresh StringReader initialized with the string s.
macro([s & body])
- macro
([& body])
varbinding=> symbol init-expr Executes the exprs in a context in which the symbols are bound to vars with per-threa...
macro([name-vals-vec & body])
Returns an object of the same type and value as obj, with map m as its metadata.
function([obj m])
bindings => [name init ...] Evaluates body in a try expression with names bound to the values of the inits, and a f...
macro([bindings & body])
Evaluates exprs in a context in which *out* is bound to a fresh StringWriter. Returns the string created by any neste...
macro([& body])
Sets the precision and rounding mode to be used for BigDecimal operations. Usage: (with-precision 10 (/ 1M 3)) or: ...
macro([precision & exprs])
binding => var-symbol temp-value-expr Temporarily redefines Vars while executing the body. The temp-value-exprs wi...
macro([bindings & body])
Temporarily redefines Vars during a call to func. Each val of binding-map will replace the root value of its key whic...
function([binding-map func])
X
A tree seq on the xml elements as per xml/parse
function([root])
Z
^
Metadata. ^{:k v} form attaches metadata to the next form.
reader-macro
`
Syntax quote. Resolves symbols to fully-qualified names; allows ~ and ~@.
reader-macro