clojure.core

(source)
The core Clojure language.

For more info about this library see:

https://clojuredocs.org/clojure.core
Public Variable Short Description
* (clj) Returns the product of nums.
*' (clj) Returns the product of nums.
*1 (clj) bound in a repl thread to the most recent value printed.
*2 (clj) bound in a repl thread to the second most recent value printed.
*3 (clj) bound in a repl thread to the third most recent value printed.
*clojure-version* (clj)
*data-readers* (clj) Map from reader tag symbols to data reader Vars.
*default-data-reader-fn* (clj) When no data reader is found for a tag and *default-data-reader-fn* is non-nil, it will be called with two arguments, the tag and the value.
*e (clj) bound in a repl thread to the most recent exception caught by the repl.
*print-length* (clj) *print-length* controls how many items of each collection the printer will print.
*print-level* (clj) *print-level* controls how many levels deep the printer will print nested objects.
*print-namespace-maps* (clj) *print-namespace-maps* controls whether the printer will print namespace map literal syntax.
*repl* (clj) Bound to true in a repl thread.
*verbose-defrecords* (clj)
+ (clj) Returns the sum of nums.
+' (clj) Returns the sum of nums.
- (clj) If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result.
-' (clj) If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result.
-> (clj) Threads the expr through the forms.
->> (clj) Threads the expr through the forms.
->ArrayChunk (clj)
->Eduction (clj)
->Vec (clj)
->VecNode (clj)
->VecSeq (clj)
-cache-protocol-fn (clj)
-reset-methods (clj)
.. (clj) form => fieldName-symbol or (instanceMethodName-symbol args*) Expands into a member access (.) of the first member on the first argument, followed by the next member on the result, etc.
/ (clj) If no denominators are supplied, returns 1/numerator, else returns numerator divided by all of the denominators.
< (clj) Returns non-nil if nums are in monotonically increasing order, otherwise false.
<= (clj) Returns non-nil if nums are in monotonically non-decreasing order, otherwise false.
= (clj) Equality.
== (clj) Returns non-nil if nums all have the equivalent value (type-independent), otherwise false.
> (clj) Returns non-nil if nums are in monotonically decreasing order, otherwise false.
>= (clj) Returns non-nil if nums are in monotonically non-increasing order, otherwise false.
ArrayChunk (clj)
ArrayManager (clj)
EMPTY-NODE (clj)
Eduction (clj)
IVecImpl (clj)
Inst (clj)
NaN? (clj) Returns true if num is NaN, else false.
PrintWriter-on (clj) implements java.io.PrintWriter given flush-fn, which will be called when .flush() is called, with a string built up since the last call to .flush().
StackTraceElement->vec (clj) Constructs a data representation for a StackTraceElement: [class method file line].
Throwable->map (clj) Constructs a data representation for a Throwable with keys: :cause - root cause message :phase - error phase :via - cause chain, with cause keys: :type - exception class symbol :message - exception message :data - ex-data :at - top stack element :trace - root cause stack elements.
Vec (clj)
VecNode (clj)
VecSeq (clj)
abs (clj) Returns the absolute value of a.
accessor (clj) Returns a fn that, given an instance of a structmap with the basis, returns the value at the key.
aclone (clj) Returns a clone of the Java array.
add-classpath (clj) DEPRECATED Adds the url (String or URL object) to the classpath per URLClassLoader.addURL.
add-tap (clj) adds f, a fn of one argument, to the tap set.
add-watch (clj) Adds a watch function to an agent/atom/var/ref reference.
agent (clj) Creates and returns an agent with an initial value of state and zero or more options (in any order): :meta metadata-map :validator validate-fn :error-handler handler-fn :error-mode mode-keyword If metadata-map is supplied, it will become the metadata on the agent.
agent-error (clj) Returns the exception thrown during an asynchronous action of the agent if the agent is failed.
agent-errors (clj) DEPRECATED: Use 'agent-error' instead.
aget (clj) Returns the value at the index/indices.
alength (clj) Returns the length of the Java array.
alias (clj) Add an alias in the current namespace to another namespace.
all-ns (clj) Returns a sequence of all namespaces.
alter (clj) Must be called in a transaction.
alter-meta! (clj) Atomically sets the metadata for a namespace/var/ref/agent/atom to be: (apply f its-current-meta args) f must be free of side-effects.
alter-var-root (clj) Atomically alters the root binding of var v by applying f to its current value plus any args.
amap (clj) Maps an expression across an array a, using an index named idx, and return value named ret, initialized to a clone of a, then setting each element of ret to the evaluation of expr, returning the new array ret.
ancestors (clj) Returns the immediate and indirect parents of tag, either via a Java type inheritance relationship or a relationship established via derive.
and (clj) Evaluates exprs one at a time, from left to right.
any? (clj) Returns true given any argument.
apply (clj) Applies fn f to the argument list formed by prepending intervening arguments to args.
areduce (clj) Reduces an expression across an array a, using an index named idx, and return value named ret, initialized to init, setting ret to the evaluation of expr at each step, returning ret.
array (clj)
array-map (clj) Constructs an array-map.
arrayFor (clj)
as-> (clj) Binds name to expr, evaluates the first form in the lexical context of that binding, then binds name to that result, repeating for each successive form, returning the result of the last form.
aset (clj) Sets the value at the index/indices.
assert (clj) Evaluates expr and throws an exception if it does not evaluate to logical true.
assoc (clj) assoc[iate].
assoc! (clj) When applied to a transient map, adds mapping of key(s) to val(s).
assoc-in (clj) Associates a value in a nested associative structure, where ks is a sequence of keys and v is the new value and returns a new nested structure.
associative? (clj) Returns true if coll implements Associative.
atom (clj) Creates and returns an Atom with an initial value of x and zero or more options (in any order): :meta metadata-map :validator validate-fn If metadata-map is supplied, it will become the metadata on the atom.
await (clj) Blocks the current thread (indefinitely!) until all actions dispatched thus far, from this thread or agent, to the agent(s) have occurred.
await-for (clj) Blocks the current thread until all actions dispatched thus far (from this thread or agent) to the agents have occurred, or the timeout (in milliseconds) has elapsed.
await1 (clj)
bases (clj) Returns the immediate superclass and direct interfaces of c, if any.
bean (clj) Takes a Java object and returns a read-only implementation of the map abstraction based upon its JavaBean properties.
bigdec (clj) Coerce to BigDecimal.
bigint (clj) Coerce to BigInt.
biginteger (clj) Coerce to BigInteger.
binding (clj) binding => var-symbol init-expr Creates new bindings for the (already-existing) vars, with the supplied initial values, executes the exprs in an implicit do, then re-establishes the bindings that existed before.
bit-and (clj) Bitwise and.
bit-and-not (clj) Bitwise and with complement.
bit-clear (clj) Clear bit at index n.
bit-flip (clj) Flip bit at index n.
bit-not (clj) Bitwise complement.
bit-or (clj) Bitwise or.
bit-set (clj) Set bit at index n.
bit-shift-left (clj) Bitwise shift left.
bit-shift-right (clj) Bitwise shift right.
bit-test (clj) Test bit at index n.
bit-xor (clj) Bitwise exclusive or.
boolean (clj) Coerce to boolean.
boolean-array (clj) Creates an array of booleans.
boolean? (clj) Return true if x is a Boolean.
bound-fn (clj) Returns a function defined by the given fntail, which will install the same bindings in effect as in the thread at the time bound-fn was called.
bound-fn* (clj) Returns a function, which will install the same bindings in effect as in the thread at the time bound-fn* was called and then call f with any given arguments.
bound? (clj) Returns true if all of the vars provided as arguments have any bound value, root or thread-local.
bounded-count (clj) If coll is counted? returns its count, else will count at most the first n elements of coll using its seq.
butlast (clj) Return a seq of all but the last item in coll, in linear time.
byte (clj) Coerce to byte.
byte-array (clj) Creates an array of bytes.
bytes? (clj) Return true if x is a byte array.
case (clj) Takes an expression, and a set of clauses.
cast (clj) Throws a ClassCastException if x is not a c, else returns x.
cat (clj) A transducer which concatenates the contents of each input, which must be a collection, into the reduction.
char (clj) Coerce to char.
char-array (clj) Creates an array of chars.
char-escape-string (clj) Returns escape string for char or nil if none.
char-name-string (clj) Returns name string for char or nil if none.
char? (clj) Return true if x is a Character.
chunk (clj)
chunk-append (clj)
chunk-buffer (clj)
chunk-cons (clj)
chunk-first (clj)
chunk-next (clj)
chunk-rest (clj)
chunked-seq? (clj)
class (clj) Returns the Class of x.
class? (clj) Returns true if x is an instance of Class.
clear-agent-errors (clj) DEPRECATED: Use 'restart-agent' instead.
clojure-version (clj) Returns clojure version as a printable string.
coll? (clj) Returns true if x implements IPersistentCollection.
comment (clj) Ignores body, yields nil.
commute (clj) Must be called in a transaction.
comp (clj) Takes a set of functions and returns a fn that is the composition of those fns.
comparator (clj) Returns an implementation of java.util.Comparator based upon pred.
compare (clj) Comparator.
compare-and-set! (clj) Atomically sets the value of atom to newval if and only if the current value of the atom is identical to oldval.
compile (clj) Compiles the namespace named by the symbol lib into a set of classfiles.
complement (clj) Takes a fn f and returns a fn that takes the same arguments as f, has the same effects, if any, and returns the opposite truth value.
completing (clj) Takes a reducing function f of 2 args and returns a fn suitable for transduce by adding an arity-1 signature that calls cf (default - identity) on the result argument.
concat (clj) Returns a lazy seq representing the concatenation of the elements in the supplied colls.
cond (clj) Takes a set of test/expr pairs.
cond-> (clj) Takes an expression and a set of test/form pairs.
cond->> (clj) Takes an expression and a set of test/form pairs.
condp (clj) Takes a binary predicate, an expression, and a set of clauses.
conj (clj) conj[oin].
conj! (clj) Adds x to the transient collection, and return coll.
cons (clj) Returns a new seq where x is the first element and seq is the rest.
constantly (clj) Returns a function that takes any number of arguments and returns x.
construct-proxy (clj) Takes a proxy class and any arguments for its superclass ctor and creates and returns an instance of the proxy.
contains? (clj) Returns true if key is present in the given collection, otherwise returns false.
count (clj) Returns the number of items in the collection.
counted? (clj) Returns true if coll implements count in constant time.
create-ns (clj) Create a new namespace named by the symbol if one doesn't already exist, returns it or the already-existing namespace of the same name.
create-struct (clj) Returns a structure basis object.
cycle (clj) Returns a lazy (infinite!) sequence of repetitions of the items in coll.
dec (clj) Returns a number one less than num.
dec' (clj) Returns a number one less than num.
decimal? (clj) Returns true if n is a BigDecimal.
declare (clj) defs the supplied var names with no bindings, useful for making forward declarations.
dedupe (clj) Returns a lazy sequence removing consecutive duplicates in coll.
default-data-readers (clj) Default map of data reader functions provided by Clojure.
definline (clj) Experimental - like defmacro, except defines a named function whose body is the expansion, calls to which may be expanded inline as if it were a macro.
definterface (clj) Creates a new Java interface with the given name and method sigs.
defmacro (clj) Like defn, but the resulting function name is declared as a macro and will be used as a macro by the compiler when it is called.
defmethod (clj) Creates and installs a new method of multimethod associated with dispatch-value.
defmulti (clj) Creates a new multimethod with the associated dispatch function.
defn (clj) Same as (def name (fn [params* ] exprs*)) or (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added to the var metadata.
defn- (clj) same as defn, yielding non-public def.
defonce (clj) defs name to have the root value of the expr iff the named var has no root value, else expr is unevaluated.
defprotocol (clj) A protocol is a named set of named methods and their signatures: (defprotocol AProtocolName ;optional doc string "A doc string for AProtocol abstraction" ;options :extend-via-metadata true ;method signatures (bar [this a b] "bar docs") (baz [this a] [this a b] [this a b c] "baz docs")) No implementations are provided.
defrecord (clj) (defrecord name [fields*] options* specs*) Options are expressed as sequential keywords and arguments (in any order).
defstruct (clj) Same as (def name (create-struct keys...)).
deftype (clj) (deftype name [fields*] options* specs*) Options are expressed as sequential keywords and arguments (in any order).
delay (clj) Takes a body of expressions and yields a Delay object that will invoke the body only the first time it is forced (with force or deref/@), and will cache the result and return it on all subsequent force calls.
delay? (clj) returns true if x is a Delay created with delay.
deliver (clj) Delivers the supplied value to the promise, releasing any pending derefs.
denominator (clj) Returns the denominator part of a Ratio.
deref (clj) Also reader macro: @ref/@agent/@var/@atom/@delay/@future/@promise.
derive (clj) Establishes a parent/child relationship between parent and tag.
descendants (clj) Returns the immediate and indirect children of tag, through a relationship established via derive.
destructure (clj)
disj (clj) disj[oin].
disj! (clj) disj[oin].
dissoc (clj) dissoc[iate].
dissoc! (clj) Returns a transient map that doesn't contain a mapping for key(s).
distinct (clj) Returns a lazy sequence of the elements of coll with duplicates removed.
distinct? (clj) Returns true if no two of the arguments are =.
doAssoc (clj)
doall (clj) When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed.
dorun (clj) When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed.
doseq (clj) Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by "for".
dosync (clj) Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls.
dotimes (clj) bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1.
doto (clj) Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments.
double (clj) Coerce to double.
double-array (clj) Creates an array of doubles.
double? (clj) Return true if x is a Double.
drop (clj) Returns a laziness-preserving sequence of all but the first n items in coll.
drop-last (clj) Return a lazy sequence of all but the last n (default 1) items in coll.
drop-while (clj) Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical false.
eduction (clj) Returns a reducible/iterable application of the transducers to the items in coll.
empty (clj) Returns an empty collection of the same category as coll, or nil.
empty? (clj) Returns true if coll has no items.
ensure (clj) Must be called in a transaction.
ensure-reduced (clj) If x is already reduced?, returns it, else returns (reduced x).
enumeration-seq (clj) Returns a seq on a java.util.Enumeration.
error-handler (clj) Returns the error-handler of agent a, or nil if there is none.
error-mode (clj) Returns the error-mode of agent a.
eval (clj) Evaluates the form data structure (not text!) and returns the result.
even? (clj) Returns true if n is even, throws an exception if n is not an integer.
every-pred (clj) Takes a set of predicates and returns a function f that returns true if all of its composing predicates return a logical true value against all of its arguments, else it returns false.
every? (clj) Returns true if (pred x) is logical true for every x in coll, else false.
ex-cause (clj) Returns the cause of ex if ex is a Throwable.
ex-data (clj) Returns exception data (a map) if ex is an IExceptionInfo.
ex-info (clj) Create an instance of ExceptionInfo, a RuntimeException subclass that carries a map of additional data.
ex-message (clj) Returns the message attached to ex if ex is a Throwable.
extend (clj) Implementations of protocol methods can be provided using the extend construct: (extend AType AProtocol {:foo an-existing-fn :bar (fn [a b] ...) :baz (fn ([a]...) ([a b] ...)...)} BProtocol {...} ...) extend takes a type/class (or interface, see below), and one or more protocol + method map pairs.
extend-protocol (clj) Useful when you want to provide several implementations of the same protocol all at once.
extend-type (clj) A macro that expands into an extend call.
extenders (clj) Returns a collection of the types explicitly extending protocol.
extends? (clj) Returns true if atype extends protocol.
false? (clj) Returns true if x is the value false, false otherwise.
ffirst (clj) Same as (first (first x)).
file-seq (clj) A tree seq on java.io.Files.
filter (clj) Returns a lazy sequence of the items in coll for which (pred item) returns logical true.
filterv (clj) Returns a vector of the items in coll for which (pred item) returns logical true.
find (clj) Returns the map entry for key, or nil if key not present.
find-keyword (clj) Returns a Keyword with the given namespace and name if one already exists.
find-ns (clj) Returns the namespace named by the symbol or nil if it doesn't exist.
find-protocol-impl (clj)
find-protocol-method (clj)
find-var (clj) Returns the global var named by the namespace-qualified symbol, or nil if no var with that name.
first (clj) Returns the first item in the collection.
flatten (clj) Takes any nested combination of sequential things (lists, vectors, etc.) and returns their contents as a single, flat lazy sequence.
float (clj) Coerce to float.
float-array (clj) Creates an array of floats.
float? (clj) Returns true if n is a floating point number.
flush (clj) Flushes the output stream that is the current value of *out*.
fn (clj) params => positional-params*, or positional-params* & rest-param positional-param => binding-form rest-param => binding-form binding-form => name, or destructuring-form Defines a function.
fn? (clj) Returns true if x implements Fn, i.e.
fnext (clj) Same as (first (next x)).
fnil (clj) Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x.
for (clj) List comprehension.
force (clj) If x is a Delay, returns the (possibly cached) value of its expression, else returns x.
format (clj) Formats a string using java.lang.String.format, see java.util.Formatter for format string syntax.
frequencies (clj) Returns a map from distinct items in coll to the number of times they appear.
future (clj) Takes a body of expressions and yields a future object that will invoke the body in another thread, and will cache the result and return it on all subsequent calls to deref/@.
future-call (clj) Takes a function of no args and yields a future object that will invoke the function in another thread, and will cache the result and return it on all subsequent calls to deref/@.
future-cancel (clj) Cancels the future, if possible.
future-cancelled? (clj) Returns true if future f is cancelled.
future-done? (clj) Returns true if future f is done.
future? (clj) Returns true if x is a future.
gen-class (clj) When compiling, generates compiled bytecode for a class with the given package-qualified :name (which, as all names in these parameters, can be a string or symbol), and writes the .class file to the *compile-path* directory.
gen-interface (clj) When compiling, generates compiled bytecode for an interface with the given package-qualified :name (which, as all names in these parameters, can be a string or symbol), and writes the .class file to the *compile-path* directory.
gensym (clj) Returns a new symbol with a unique name.
get (clj) Returns the value mapped to key, not-found or nil if key not present in associative collection, set, string, array, or ILookup instance.
get-in (clj) Returns the value in a nested associative structure, where ks is a sequence of keys.
get-method (clj) Given a multimethod and a dispatch value, returns the dispatch fn that would apply to that value, or nil if none apply and no default.
get-proxy-class (clj) Takes an optional single class followed by zero or more interfaces.
get-thread-bindings (clj) Get a map with the Var/value pairs which is currently in effect for the current thread.
get-validator (clj) Gets the validator-fn for a var/ref/agent/atom.
global-hierarchy (clj)
group-by (clj) Returns a map of the elements of coll keyed by the result of f on each element.
halt-when (clj) Returns a transducer that ends transduction when pred returns true for an input.
hash (clj) Returns the hash code of its argument.
hash-combine (clj)
hash-map (clj) keyval => key val Returns a new hash map with supplied mappings.
hash-ordered-coll (clj) Returns the hash code, consistent with =, for an external ordered collection implementing Iterable.
hash-set (clj) Returns a new hash set with supplied keys.
hash-unordered-coll (clj) Returns the hash code, consistent with =, for an external unordered collection implementing Iterable.
ident? (clj) Return true if x is a symbol or keyword.
identical? (clj) Tests if 2 arguments are the same object.
identity (clj) Returns its argument.
if-let (clj) bindings => binding-form test If test is true, evaluates then with binding-form bound to the value of test, if not, yields else.
if-not (clj) Evaluates test.
if-some (clj) bindings => binding-form test If test is not nil, evaluates then with binding-form bound to the value of test, if not, yields else.
ifn? (clj) Returns true if x implements IFn.
import (clj) import-list => (package-symbol class-name-symbols*) For each name in class-name-symbols, adds a mapping from name to the class named by package.name to the current namespace.
inc (clj) Returns a number one greater than num.
inc' (clj) Returns a number one greater than num.
indexed? (clj) Return true if coll implements Indexed, indicating efficient lookup by index.
infinite? (clj) Returns true if num is negative or positive infinity, else false.
init-proxy (clj) Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and sets the proxy's fn map.
inst-ms (clj) Return the number of milliseconds since January 1, 1970, 00:00:00 GMT.
inst-ms* (clj)
inst? (clj) Return true if x satisfies Inst.
instance? (clj) Evaluates x and tests if it is an instance of the class c.
int (clj) Coerce to int.
int-array (clj) Creates an array of ints.
int? (clj) Return true if x is a fixed precision integer.
integer? (clj) Returns true if n is an integer.
interleave (clj) Returns a lazy seq of the first item in each coll, then the second etc.
intern (clj) Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting its root binding to val if supplied.
interpose (clj) Returns a lazy seq of the elements of coll separated by sep.
into (clj) Returns a new coll consisting of to-coll with all of the items of from-coll conjoined.
into-array (clj) Returns an array with components set to the values in aseq.
io! (clj) If an io! block occurs in a transaction, throws an IllegalStateException, else runs body in an implicit do.
isa? (clj) Returns true if (= child parent), or child is directly or indirectly derived from parent, either via a Java type inheritance relationship or a relationship established via derive.
iterate (clj) Returns a lazy sequence of x, (f x), (f (f x)) etc.
iteration (clj) Creates a seqable/reducible via repeated calls to step, a function of some (continuation token) 'k'.
iterator-seq (clj) Returns a seq on a java.util.Iterator.
juxt (clj) Takes a set of functions and returns a fn that is the juxtaposition of those fns.
keep (clj) Returns a lazy sequence of the non-nil results of (f item).
keep-indexed (clj) Returns a lazy sequence of the non-nil results of (f index item).
key (clj) Returns the key of the map entry.
keys (clj) Returns a sequence of the map's keys, in the same order as (seq map).
keyword (clj) Returns a Keyword with the given namespace and name.
keyword? (clj) Return true if x is a Keyword.
last (clj) Return the last item in coll, in linear time.
lazy-cat (clj) Expands to code which yields a lazy sequence of the concatenation of the supplied colls.
lazy-seq (clj) Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only the first time seq is called, and will cache the result and return it on all subsequent seq calls.
let (clj) binding => binding-form init-expr binding-form => name, or destructuring-form destructuring-form => map-destructure-form, or seq-destructure-form Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein.
letfn (clj) fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+) Takes a vector of function specs and a body, and generates a set of bindings of functions to their names.
line-seq (clj) Returns the lines of text from rdr as a lazy sequence of strings.
list (clj) Creates a new list containing the items.
list* (clj) Creates a new seq containing the items prepended to the rest, the last of which will be treated as a sequence.
list? (clj) Returns true if x implements IPersistentList.
load (clj) Loads Clojure code from resources in classpath.
load-reader (clj) Sequentially read and evaluate the set of forms contained in the stream/file.
load-string (clj) Sequentially read and evaluate the set of forms contained in the string.
loaded-libs (clj) Returns a sorted set of symbols naming the currently loaded libs.
locking (clj) Executes exprs in an implicit do, while holding the monitor of x.
long (clj) Coerce to long.
long-array (clj) Creates an array of longs.
loop (clj) Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein.
macroexpand (clj) Repeatedly calls macroexpand-1 on form until it no longer represents a macro form, then returns it.
macroexpand-1 (clj) If form represents a macro form, returns its expansion, else returns form.
make-array (clj) Creates and returns an array of instances of the specified class of the specified dimension(s).
make-hierarchy (clj) Creates a hierarchy object for use with derive, isa? etc.
map (clj) Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted.
map-entry? (clj) Return true if x is a map entry.
map-indexed (clj) Returns a lazy sequence consisting of the result of applying f to 0 and the first item of coll, followed by applying f to 1 and the second item in coll, etc, until coll is exhausted.
map? (clj) Return true if x implements IPersistentMap.
mapcat (clj) Returns the result of applying concat to the result of applying map to f and colls.
mapv (clj) Returns a vector consisting of the result of applying f to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted.
max (clj) Returns the greatest of the nums.
max-key (clj) Returns the x for which (k x), a number, is greatest.
memfn (clj) Expands into code that creates a fn that expects to be passed an object and any args and calls the named instance method on the object passing the args.
memoize (clj) Returns a memoized version of a referentially transparent function.
merge (clj) Returns a map that consists of the rest of the maps conj-ed onto the first.
merge-with (clj) Returns a map that consists of the rest of the maps conj-ed onto the first.
meta (clj) Returns the metadata of obj, returns nil if there is no metadata.
method-sig (clj)
methods (clj) Given a multimethod, returns a map of dispatch values -> dispatch fns.
min (clj) Returns the least of the nums.
min-key (clj) Returns the x for which (k x), a number, is least.
mix-collection-hash (clj) Mix final collection hash for ordered or unordered collections.
mod (clj) Modulus of num and div.
munge (clj)
name (clj) Returns the name String of a string, symbol or keyword.
namespace (clj) Returns the namespace String of a symbol or keyword, or nil if not present.
namespace-munge (clj) Convert a Clojure namespace name to a legal Java package name.
nat-int? (clj) Return true if x is a non-negative fixed precision integer.
neg-int? (clj) Return true if x is a negative fixed precision integer.
neg? (clj) Returns true if num is less than zero, else false.
newPath (clj)
newline (clj) Writes a platform-specific newline to *out*.
next (clj) Returns a seq of the items after the first.
nfirst (clj) Same as (next (first x)).
nil? (clj) Returns true if x is nil, false otherwise.
nnext (clj) Same as (next (next x)).
not (clj) Returns true if x is logical false, false otherwise.
not-any? (clj) Returns false if (pred x) is logical true for any x in coll, else true.
not-empty (clj) If coll is empty, returns nil, else coll.
not-every? (clj) Returns false if (pred x) is logical true for every x in coll, else true.
not= (clj) Same as (not (= obj1 obj2)).
ns (clj) Sets *ns* to the namespace named by name (unevaluated), creating it if needed.
ns-aliases (clj) Returns a map of the aliases for the namespace.
ns-imports (clj) Returns a map of the import mappings for the namespace.
ns-interns (clj) Returns a map of the intern mappings for the namespace.
ns-map (clj) Returns a map of all the mappings for the namespace.
ns-name (clj) Returns the name of the namespace, a symbol.
ns-publics (clj) Returns a map of the public intern mappings for the namespace.
ns-refers (clj) Returns a map of the refer mappings for the namespace.
ns-resolve (clj) Returns the var or Class to which a symbol will be resolved in the namespace (unless found in the environment), else nil.
ns-unalias (clj) Removes the alias for the symbol from the namespace.
ns-unmap (clj) Removes the mappings for the symbol from the namespace.
nth (clj) Returns the value at the index.
nthnext (clj) Returns the nth next of coll, (seq coll) when n is 0.
nthrest (clj) Returns the nth rest of coll, coll when n is 0.
num (clj) Coerce to Number.
number? (clj) Returns true if x is a Number.
numerator (clj) Returns the numerator part of a Ratio.
object-array (clj) Creates an array of objects.
odd? (clj) Returns true if n is odd, throws an exception if n is not an integer.
or (clj) Evaluates exprs one at a time, from left to right.
parents (clj) Returns the immediate parents of tag, either via a Java type inheritance relationship or a relationship established via derive.
parse-boolean (clj) Parse strings "true" or "false" and return a boolean, or nil if invalid.
parse-double (clj) Parse string with floating point components and return a Double value, or nil if parse fails.
parse-long (clj) Parse string of decimal digits with optional leading -/+ and return a Long value, or nil if parse fails.
parse-uuid (clj) Parse a string representing a UUID and return a java.util.UUID instance, or nil if parse fails.
partial (clj) Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of additional args.
partition (clj) Returns a lazy sequence of lists of n items each, at offsets step apart.
partition-all (clj) Returns a lazy sequence of lists like partition, but may include partitions with fewer than n items at the end.
partition-by (clj) Applies f to each value in coll, splitting it each time f returns a new value.
partitionv (clj) Returns a lazy sequence of vectors of n items each, at offsets step apart.
partitionv-all (clj) Returns a lazy sequence of vector partitions, but may include partitions with fewer than n items at the end.
pcalls (clj) Executes the no-arg fns in parallel, returning a lazy sequence of their values.
peek (clj) For a list or queue, same as first, for a vector, same as, but much more efficient than, last.
persistent! (clj) Returns a new, persistent version of the transient collection, in constant time.
pmap (clj) Like map, except f is applied in parallel.
pop (clj) For a list or queue, returns a new list/queue without the first item, for a vector, returns a new vector without the last item.
pop! (clj) Removes the last item from a transient vector.
pop-thread-bindings (clj) Pop one set of bindings pushed with push-binding before.
popTail (clj)
pos-int? (clj) Return true if x is a positive fixed precision integer.
pos? (clj) Returns true if num is greater than zero, else false.
pr (clj) Prints the object(s) to the output stream that is the current value of *out*.
pr-str (clj) pr to a string, returning it.
prefer-method (clj) Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y when there is a conflict.
prefers (clj) Given a multimethod, returns a map of preferred value -> set of other values.
primitives-classnames (clj)
print (clj) Prints the object(s) to the output stream that is the current value of *out*.
print-ctor (clj)
print-dup (clj)
print-method (clj)
print-simple (clj)
print-str (clj) print to a string, returning it.
printf (clj) Prints formatted output, as per format.
println (clj) Same as print followed by (newline).
println-str (clj) println to a string, returning it.
prn (clj) Same as pr followed by (newline).
prn-str (clj) prn to a string, returning it.
process-annotation (clj)
promise (clj) Returns a promise object that can be read with deref/@, and set, once only, with deliver.
proxy (clj) class-and-interfaces - a vector of class names args - a (possibly empty) vector of arguments to the superclass constructor.
proxy-call-with-super (clj)
proxy-mappings (clj) Takes a proxy instance and returns the proxy's fn map.
proxy-name (clj)
proxy-super (clj) Use to call a superclass method in the body of a proxy method.
push-thread-bindings (clj) WARNING: This is a low-level function.
pushTail (clj)
pvalues (clj) Returns a lazy sequence of the values of the exprs, which are evaluated in parallel.
qualified-ident? (clj) Return true if x is a symbol or keyword with a namespace.
qualified-keyword? (clj) Return true if x is a keyword with a namespace.
qualified-symbol? (clj) Return true if x is a symbol with a namespace.
quot (clj) quot[ient] of dividing numerator by denominator.
rand (clj) Returns a random floating point number between 0 (inclusive) and n (default 1) (exclusive).
rand-int (clj) Returns a random integer between 0 (inclusive) and n (exclusive).
rand-nth (clj) Return a random element of the (sequential) collection.
random-sample (clj) Returns items from coll with random probability of prob (0.0 - 1.0).
random-uuid (clj) Returns a pseudo-randomly generated java.util.UUID instance (i.e.
range (clj) Returns a lazy seq of nums from start (inclusive) to end (exclusive), by step, where start defaults to 0, step to 1, and end to infinity.
ratio? (clj) Returns true if n is a Ratio.
rational? (clj) Returns true if n is a rational number.
rationalize (clj) returns the rational value of num.
re-find (clj) Returns the next regex match, if any, of string to pattern, using java.util.regex.Matcher.find().
re-groups (clj) Returns the groups from the most recent match/find.
re-matcher (clj) Returns an instance of java.util.regex.Matcher, for use, e.g.
re-matches (clj) Returns the match, if any, of string to pattern, using java.util.regex.Matcher.matches().
re-pattern (clj) Returns an instance of java.util.regex.Pattern, for use, e.g.
re-seq (clj) Returns a lazy sequence of successive matches of pattern in string, using java.util.regex.Matcher.find(), each such match processed with re-groups.
read (clj) Reads the next object from stream, which must be an instance of java.io.PushbackReader or some derivee.
read+string (clj) Like read, and taking the same args.
read-line (clj) Reads the next line from stream that is the current value of *in* .
read-string (clj) Reads one object from the string s.
reader-conditional (clj) Construct a data representation of a reader conditional.
reader-conditional? (clj) Return true if the value is the data representation of a reader conditional.
realized? (clj) Returns true if a value has been produced for a promise, delay, future or lazy sequence.
record? (clj) Returns true if x is a record.
reduce (clj) f should be a function of 2 arguments.
reduce-kv (clj) Reduces an associative collection.
reduced (clj) Wraps x in a way such that a reduce will terminate with the value x.
reduced? (clj) Returns true if x is the result of a call to reduced.
reductions (clj) Returns a lazy seq of the intermediate values of the reduction (as per reduce) of coll by f, starting with init.
ref (clj) Creates and returns a Ref with an initial value of x and zero or more options (in any order): :meta metadata-map :validator validate-fn :min-history (default 0) :max-history (default 10) If metadata-map is supplied, it will become the metadata on the ref.
ref-history-count (clj) Returns the history count of a ref.
ref-max-history (clj) Gets the max-history of a ref, or sets it and returns the ref.
ref-min-history (clj) Gets the min-history of a ref, or sets it and returns the ref.
ref-set (clj) Must be called in a transaction.
refer (clj) refers to all public vars of ns, subject to filters.
refer-clojure (clj) Same as (refer 'clojure.core <filters>).
reify (clj) reify creates an object implementing a protocol or interface.
release-pending-sends (clj) Normally, actions sent directly or indirectly during another action are held until the action completes (changes the agent's state).
rem (clj) remainder of dividing numerator by denominator.
remove (clj) Returns a lazy sequence of the items in coll for which (pred item) returns logical false.
remove-all-methods (clj) Removes all of the methods of multimethod.
remove-method (clj) Removes the method of multimethod associated with dispatch-value.
remove-ns (clj) Removes the namespace named by the symbol.
remove-tap (clj) Remove f from the tap set.
remove-watch (clj) Removes a watch (set by add-watch) from a reference.
repeat (clj) Returns a lazy (infinite!, or length n if supplied) sequence of xs.
repeatedly (clj) Takes a function of no args, presumably with side effects, and returns an infinite (or length n if supplied) lazy sequence of calls to it.
replace (clj) Given a map of replacement pairs and a vector/collection, returns a vector/seq with any elements = a key in smap replaced with the corresponding val in smap.
replicate (clj) DEPRECATED: Use 'repeat' instead.
require (clj) Loads libs, skipping any that are already loaded.
requiring-resolve (clj) Resolves namespace-qualified sym per 'resolve'.
reset! (clj) Sets the value of atom to newval without regard for the current value.
reset-meta! (clj) Atomically resets the metadata for a namespace/var/ref/agent/atom.
reset-vals! (clj) Sets the value of atom to newval.
resolve (clj) same as (ns-resolve *ns* symbol) or (ns-resolve *ns* &env symbol).
rest (clj) Returns a possibly empty seq of the items after the first.
restart-agent (clj) When an agent is failed, changes the agent state to new-state and then un-fails the agent so that sends are allowed again.
resultset-seq (clj) Creates and returns a lazy sequence of structmaps corresponding to the rows in the java.sql.ResultSet rs.
reverse (clj) Returns a seq of the items in coll in reverse order.
reversible? (clj) Returns true if coll implements Reversible.
rseq (clj) Returns, in constant time, a seq of the items in rev (which can be a vector or sorted-map), in reverse order.
rsubseq (clj) sc must be a sorted collection, test(s) one of <, <=, > or >=.
run! (clj) Runs the supplied procedure (via reduce), for purposes of side effects, on successive items in the collection.
satisfies? (clj) Returns true if x satisfies the protocol.
second (clj) Same as (first (next x)).
select-keys (clj) Returns a map containing only those entries in map whose key is in keys.
send (clj) Dispatch an action to an agent.
send-off (clj) Dispatch a potentially blocking action to an agent.
send-via (clj) Dispatch an action to an agent.
seq (clj) Returns a seq on the collection.
seq-to-map-for-destructuring (clj) Builds a map from a seq as described in https://clojure.org/reference/special_forms#keyword-arguments.
seq? (clj) Return true if x implements ISeq.
seqable? (clj) Return true if the seq function is supported for x.
seque (clj) Creates a queued seq on another (presumably lazy) seq s.
sequence (clj) Coerces coll to a (possibly empty) sequence, if it is not already one.
sequential? (clj) Returns true if coll implements Sequential.
set (clj) Returns a set of the distinct elements of coll.
set-agent-send-executor! (clj) Sets the ExecutorService to be used by send.
set-agent-send-off-executor! (clj) Sets the ExecutorService to be used by send-off.
set-error-handler! (clj) Sets the error-handler of agent a to handler-fn.
set-error-mode! (clj) Sets the error-mode of agent a to mode-keyword, which must be either :fail or :continue.
set-validator! (clj) Sets the validator-fn for a var/ref/agent/atom.
set? (clj) Returns true if x implements IPersistentSet.
short (clj) Coerce to short.
short-array (clj) Creates an array of shorts.
shuffle (clj) Return a random permutation of coll.
shutdown-agents (clj) Initiates a shutdown of the thread pools that back the agent system.
simple-ident? (clj) Return true if x is a symbol or keyword without a namespace.
simple-keyword? (clj) Return true if x is a keyword without a namespace.
simple-symbol? (clj) Return true if x is a symbol without a namespace.
slurp (clj) Opens a reader on f and reads all its contents, returning a string.
some (clj) Returns the first logical true value of (pred x) for any x in coll, else nil.
some-> (clj) When expr is not nil, threads it into the first form (via ->), and when that result is not nil, through the next etc.
some->> (clj) 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 (clj) Takes a set of predicates and returns a function f that returns the first logical true value returned by one of its composing predicates against any of its arguments, else it returns logical false.
some? (clj) Returns true if x is not nil, false otherwise.
sort (clj) Returns a sorted sequence of the items in coll.
sort-by (clj) Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item).
sorted-map (clj) keyval => key val Returns a new sorted map with supplied mappings.
sorted-map-by (clj) keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator.
sorted-set (clj) Returns a new sorted set with supplied keys.
sorted-set-by (clj) Returns a new sorted set with supplied keys, using the supplied comparator.
sorted? (clj) Returns true if coll implements Sorted.
special-symbol? (clj) Returns true if s names a special form.
spit (clj) Opposite of slurp.
split-at (clj) Returns a vector of [(take n coll) (drop n coll)].
split-with (clj) Returns a vector of [(take-while pred coll) (drop-while pred coll)].
splitv-at (clj) Returns a vector of [(into [] (take n) coll) (drop n coll)].
str (clj) With no args, returns the empty string.
string? (clj) Return true if x is a String.
struct (clj) Returns a new structmap instance with the keys of the structure-basis.
struct-map (clj) Returns a new structmap instance with the keys of the structure-basis.
subs (clj) Returns the substring of s beginning at start inclusive, and ending at end (defaults to length of string), exclusive.
subseq (clj) sc must be a sorted collection, test(s) one of <, <=, > or >=.
subvec (clj) Returns a persistent vector of the items in vector from start (inclusive) to end (exclusive).
supers (clj) Returns the immediate and indirect superclasses and interfaces of c, if any.
swap! (clj) Atomically swaps the value of atom to be: (apply f current-value-of-atom args).
swap-vals! (clj) Atomically swaps the value of atom to be: (apply f current-value-of-atom args).
symbol (clj) Returns a Symbol with the given namespace and name.
symbol? (clj) Return true if x is a Symbol.
sync (clj) transaction-flags => TBD, pass nil for now Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls.
tagged-literal (clj) Construct a data representation of a tagged literal from a tag symbol and a form.
tagged-literal? (clj) Return true if the value is the data representation of a tagged literal.
tailoff (clj)
take (clj) Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n.
take-last (clj) Returns a seq of the last n items in coll.
take-nth (clj) Returns a lazy seq of every nth item in coll.
take-while (clj) Returns a lazy sequence of successive items from coll while (pred item) returns logical true.
tap> (clj) sends x to any taps.
test (clj) test [v] finds fn at key :test in var metadata and calls it, presuming failure will throw exception.
the-ns (clj) If passed a namespace, returns it.
thread-bound? (clj) Returns true if all of the vars provided as arguments have thread-local bindings.
time (clj) Evaluates expr and prints the time it took.
to-array (clj) Returns an array of Objects containing the contents of coll, which can be any Collection.
to-array-2d (clj) Returns a (potentially-ragged) 2-dimensional array of Objects containing the contents of coll, which can be any Collection of any Collection.
trampoline (clj) trampoline can be used to convert algorithms requiring mutual recursion without stack consumption.
transduce (clj) reduce with a transformation of f (xf).
transient (clj) Returns a new, transient version of the collection, in constant time.
tree-seq (clj) Returns a lazy sequence of the nodes in a tree, via a depth-first walk.
true? (clj) Returns true if x is the value true, false otherwise.
type (clj) Returns the :type metadata of x, or its Class if none.
unchecked-add (clj) Returns the sum of x and y, both long.
unchecked-add-int (clj) Returns the sum of x and y, both int.
unchecked-byte (clj) Coerce to byte.
unchecked-char (clj) Coerce to char.
unchecked-dec (clj) Returns a number one less than x, a long.
unchecked-dec-int (clj) Returns a number one less than x, an int.
unchecked-divide-int (clj) Returns the division of x by y, both int.
unchecked-double (clj) Coerce to double.
unchecked-float (clj) Coerce to float.
unchecked-inc (clj) Returns a number one greater than x, a long.
unchecked-inc-int (clj) Returns a number one greater than x, an int.
unchecked-int (clj) Coerce to int.
unchecked-long (clj) Coerce to long.
unchecked-multiply (clj) Returns the product of x and y, both long.
unchecked-multiply-int (clj) Returns the product of x and y, both int.
unchecked-negate (clj) Returns the negation of x, a long.
unchecked-negate-int (clj) Returns the negation of x, an int.
unchecked-remainder-int (clj) Returns the remainder of division of x by y, both int.
unchecked-short (clj) Coerce to short.
unchecked-subtract (clj) Returns the difference of x and y, both long.
unchecked-subtract-int (clj) Returns the difference of x and y, both int.
underive (clj) Removes a parent/child relationship between parent and tag.
unquote (clj)
unquote-splicing (clj)
unreduced (clj) If x is reduced?, returns (deref x), else returns x.
unsigned-bit-shift-right (clj) Bitwise shift right, without sign-extension.
update (clj) 'Updates' a value in an associative structure, where k is a key and f is a function that will take the old value and any supplied args and return the new value, and returns a new structure.
update-in (clj) 'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure.
update-keys (clj) 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 applying f to the keys of m, mapped to the corresponding values of m.
update-proxy (clj) Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and updates (via assoc) the proxy's fn map.
update-vals (clj) 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 to result of applying f to the corresponding values of m.
uri? (clj) Return true if x is a java.net.URI.
use (clj) Like 'require, but also refers to each lib's namespace using clojure.core/refer.
uuid? (clj) Return true if x is a java.util.UUID.
val (clj) Returns the value in the map entry.
vals (clj) Returns a sequence of the map's values, in the same order as (seq map).
var-get (clj) Gets the value in the var object.
var-set (clj) Sets the value in the var object to val.
var? (clj) Returns true if v is of type clojure.lang.Var.
vary-meta (clj) Returns an object of the same type and value as obj, with (apply f (meta obj) args) as its metadata.
vec (clj) Creates a new vector containing the contents of coll.
vector (clj) Creates a new vector containing the args.
vector-of (clj) Creates a new vector of a single primitive type t, where t is one of :int :long :float :double :byte :short :char or :boolean.
vector? (clj) Return true if x implements IPersistentVector.
volatile! (clj) Creates and returns a Volatile with an initial value of val.
volatile? (clj) Returns true if x is a volatile.
vreset! (clj) Sets the value of volatile to newval without regard for the current value.
vswap! (clj) Non-atomically swaps the value of the volatile as if: (apply f current-value-of-vol args).
when (clj) Evaluates test.
when-first (clj) bindings => x xs Roughly the same as (when (seq xs) (let [x (first xs)] body)) but xs is evaluated only once.
when-let (clj) bindings => binding-form test When test is true, evaluates body with binding-form bound to the value of test.
when-not (clj) Evaluates test.
when-some (clj) bindings => binding-form test When test is not nil, evaluates body with binding-form bound to the value of test.
while (clj) Repeatedly executes body while test expression is true.
with-bindings (clj) Takes a map of Var/value pairs.
with-bindings* (clj) Takes a map of Var/value pairs.
with-in-str (clj) Evaluates body in a context in which *in* is bound to a fresh StringReader initialized with the string s.
with-loading-context (clj)
with-local-vars (clj) varbinding=> symbol init-expr Executes the exprs in a context in which the symbols are bound to vars with per-thread bindings to the init-exprs.
with-meta (clj) Returns an object of the same type and value as obj, with map m as its metadata.
with-open (clj) bindings => [name init ...] Evaluates body in a try expression with names bound to the values of the inits, and a finally clause that calls (.close name) on each name in reverse order.
with-out-str (clj) Evaluates exprs in a context in which *out* is bound to a fresh StringWriter.
with-precision (clj) Sets the precision and rounding mode to be used for BigDecimal operations.
with-redefs (clj) binding => var-symbol temp-value-expr Temporarily redefines Vars while executing the body.
with-redefs-fn (clj) Temporarily redefines Vars during a call to func.
xml-seq (clj) A tree seq on the xml elements as per xml/parse.
zero? (clj) Returns true if num is zero, else false.
zipmap (clj) Returns a map with the keys mapped to the corresponding vals.