Movatterモバイル変換


[0]ホーム

URL:


Clojure

Clojure Core API Reference

Clojurev1.12.0 API
Namespaces
Other Versions
Clojure Home

Table of Contents

Vars and Functions

API forclojure.core -Clojurev1.12.0 (stable)


Full namespace name:clojure.core

Overview

Fundamental library of the Clojure language

Types



ArrayChunk

type
    Fields:[am arr off end]
Protocols:
Interfaces:clojure.lang.IChunk, clojure.lang.Indexed


Eduction

type
    Fields:[xform coll]
Protocols:
Interfaces:clojure.lang.IReduceInit, clojure.lang.Sequential, java.lang.Iterable


Vec

type
    Fields:[am cnt shift root tail _meta]
Protocols:
Interfaces:clojure.core.IVecImpl, clojure.lang.Associative, clojure.lang.Counted, clojure.lang.IFn, clojure.lang.IHashEq, clojure.lang.ILookup, clojure.lang.IMeta, clojure.lang.IObj, clojure.lang.IPersistentCollection, clojure.lang.IPersistentStack, clojure.lang.IPersistentVector, clojure.lang.Indexed, clojure.lang.Reversible, clojure.lang.Seqable, clojure.lang.Sequential, java.lang.Comparable, java.lang.Iterable, java.util.Collection, java.util.List


VecNode

type
    Fields:[edit arr]
Protocols:
Interfaces:


VecSeq

type
    Fields:[am vec anode i offset _meta]
Protocols:clojure.core.protocols/InternalReduce
Interfaces:clojure.lang.IChunkedSeq, clojure.lang.IHashEq, clojure.lang.IMeta, clojure.lang.IObj, clojure.lang.ISeq, clojure.lang.Seqable, java.lang.Iterable

Public Variables and Functions



&

special syntax
Syntax for use with fn.Please seehttps://clojure.org/reference/special_forms#fn
Added in Clojure version 1.0


*

function
Usage: (*)       (* x)       (* x y)       (* x y & more)
Returns the product of nums. (*) returns 1. Does not auto-promotelongs, will throw on overflow. See also: *'
Added in Clojure version 1.2
Source


*'

function
Usage: (*')       (*' x)       (*' x y)       (*' x y & more)
Returns the product of nums. (*') returns 1. Supports arbitrary precision.See also: *
Added in Clojure version 1.0
Source


*1

dynamic var
bound in a repl thread to the most recent value printed
Added in Clojure version 1.0
Source


*2

dynamic var
bound in a repl thread to the second most recent value printed
Added in Clojure version 1.0
Source


*3

dynamic var
bound in a repl thread to the third most recent value printed
Added in Clojure version 1.0
Source


*agent*

var
The agent currently running an action on this thread, else nil
Added in Clojure version 1.0


*assert*

var
When set to logical false, 'assert' will omit assertion checks incompiled code. Defaults to true.
Added in Clojure version 1.0


*clojure-version*

dynamic var
The version info for Clojure core, as a map containing :major :minor :incremental and :qualifier keys. Feature releases may increment :minor and/or :major, bugfix releases will increment :incremental. Possible values of :qualifier include "GA", "SNAPSHOT", "RC-x" "BETA-x"
Added in Clojure version 1.0
Source


*command-line-args*

var
A sequence of the supplied command line arguments, or nil ifnone were supplied
Added in Clojure version 1.0


*compile-files*

var
Set to true when compiling files, false otherwise.
Added in Clojure version 1.0


*compile-path*

var
Specifies the directory where 'compile' will write out .classfiles. This directory must be in the classpath for 'compile' towork.Defaults to "classes"
Added in Clojure version 1.0


*compiler-options*

var
A map of keys to options.Note, when binding dynamically make sure to merge with previous value.Supported options::elide-meta - a collection of metadata keys to elide during compilation.:disable-locals-clearing - set to true to disable clearing, useful for using a debugger:direct-linking - set to true to use direct static invocation of functions, rather than vars  Note that call sites compiled with direct linking will not be affected by var redefinition.  Use ^:redef (or ^:dynamic) on a var to prevent direct linking and allow redefinition.Seehttps://clojure.org/reference/compilation for more information.
Added in Clojure version 1.4


*data-readers*

dynamic var
Map from reader tag symbols to data reader Vars.When Clojure starts, it searches for files named 'data_readers.clj'and 'data_readers.cljc' at the root of the classpath. Each such filemust contain a literal map of symbols, like this:    {foo/bar my.project.foo/bar     foo/baz my.project/baz}The first symbol in each pair is a tag that will be recognized bythe Clojure reader. The second symbol in the pair is thefully-qualified name of a Var which will be invoked by the reader toparse the form following the tag. For example, given thedata_readers.clj file above, the Clojure reader would parse thisform:    #foo/bar [1 2 3]by invoking the Var #'my.project.foo/bar on the vector [1 2 3]. Thedata reader function is invoked on the form AFTER it has been readas a normal Clojure data structure by the reader.Reader tags without namespace qualifiers are reserved forClojure. Default reader tags are defined inclojure.core/default-data-readers but may be overridden indata_readers.clj, data_readers.cljc, or by rebinding this Var.
Added in Clojure version 1.4
Source


*default-data-reader-fn*

dynamic var
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.  If *default-data-reader-fn* is nil (thedefault), an exception will be thrown for the unknown tag.
Added in Clojure version 1.5
Source


*e

dynamic var
bound in a repl thread to the most recent exception caught by the repl
Added in Clojure version 1.0
Source


*err*

var
A java.io.Writer object representing standard error for print operations.Defaults to System/err, wrapped in a PrintWriter
Added in Clojure version 1.0


*file*

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


*flush-on-newline*

var
When set to true, output will be flushed whenever a newline is printed.Defaults to true.
Added in Clojure version 1.0


*in*

var
A java.io.Reader object representing standard input for read operations.Defaults to System/in, wrapped in a LineNumberingPushbackReader
Added in Clojure version 1.0


*ns*

var
A clojure.lang.Namespace object representing the current namespace.
Added in Clojure version 1.0


*out*

var
A java.io.Writer object representing standard output for print operations.Defaults to System/out, wrapped in an OutputStreamWriter
Added in Clojure version 1.0


*print-dup*

var
When set to logical true, objects will be printed in a way that preservestheir type when read in later.Defaults to false.
Added in Clojure version 1.0


*print-length*

dynamic var
*print-length* controls how many items of each collection theprinter will print. If it is bound to logical false, there is nolimit. Otherwise, it must be bound to an integer indicating the maximumnumber of items of each collection to print. If a collection containsmore items, the printer will print items up to the limit followed by'...' to represent the remaining items. The root binding is nilindicating no limit.
Added in Clojure version 1.0
Source


*print-level*

dynamic var
*print-level* controls how many levels deep the printer willprint nested objects. If it is bound to logical false, there is nolimit. Otherwise, it must be bound to an integer indicating the maximumlevel to print. Each argument to print is at level 0; if an argument is acollection, its items are at level 1; and so on. If an object is acollection and is at a level greater than or equal to the value bound to*print-level*, the printer prints '#' to represent it. The root bindingis nil indicating no limit.
Added in Clojure version 1.0
Source


*print-meta*

var
If set to logical true, when printing an object, its metadata will alsobe printed in a form that can be read back by the reader.Defaults to false.
Added in Clojure version 1.0


*print-namespace-maps*

dynamic var
*print-namespace-maps* controls whether the printer will printnamespace map literal syntax. It defaults to false, but the REPL bindsto true.
Added in Clojure version 1.9
Source


*print-readably*

var
When set to logical false, strings and characters will be printed withnon-alphanumeric characters converted to the appropriate escape sequences.Defaults to true
Added in Clojure version 1.0


*read-eval*

var
Defaults to true (or value specified by system property, see below)***This setting implies that the full power of the reader is in play,including syntax that can cause code to execute. It should never beused with untrusted sources. See also: clojure.edn/read.***When set to logical false in the thread-local binding,the eval reader (#=) and record/type literal syntax are disabled in read/load.Example (will fail): (binding [*read-eval* false] (read-string "#=(* 2 21)"))The default binding can be controlled by the system property'clojure.read.eval' System properties can be set on the command linelike this:java -Dclojure.read.eval=false ...The system property can also be set to 'unknown' via-Dclojure.read.eval=unknown, in which case the default bindingis :unknown and all reads will fail in contexts where *read-eval*has not been explicitly bound to either true or false. This settingcan be a useful diagnostic tool to ensure that all of your readsoccur in considered contexts. You can also accomplish this in aparticular scope by binding *read-eval* to :unknown
Added in Clojure version 1.0


*repl*

dynamic var
Bound to true in a repl thread
Added in Clojure version 1.12
Source


*unchecked-math*

var
While bound to true, compilations of +, -, *, inc, dec and thecoercions will be done without overflow checks. While boundto :warn-on-boxed, same behavior as true, and a warning is emittedwhen compilation uses boxed math. Default: false.
Added in Clojure version 1.3


*warn-on-reflection*

var
When set to true, the compiler will emit warnings when reflection isneeded to resolve Java method calls or field accesses.Defaults to false.
Added in Clojure version 1.0


+

function
Usage: (+)       (+ x)       (+ x y)       (+ x y & more)
Returns the sum of nums. (+) returns 0. Does not auto-promotelongs, will throw on overflow. See also: +'
Added in Clojure version 1.2
Source


+'

function
Usage: (+')       (+' x)       (+' x y)       (+' x y & more)
Returns the sum of nums. (+') returns 0. Supports arbitrary precision.See also: +
Added in Clojure version 1.0
Source


-

function
Usage: (- x)       (- x y)       (- x y & more)
If no ys are supplied, returns the negation of x, else subtractsthe ys from x and returns the result. Does not auto-promotelongs, will throw on overflow. See also: -'
Added in Clojure version 1.2
Source


-'

function
Usage: (-' x)       (-' x y)       (-' x y & more)
If no ys are supplied, returns the negation of x, else subtractsthe ys from x and returns the result. Supports arbitrary precision.See also: -
Added in Clojure version 1.0
Source


->

macro
Usage: (-> x & forms)
Threads the expr through the forms. Inserts x as thesecond item in the first form, making a list of it if it is not alist already. If there are more forms, inserts the first form as thesecond item in second form, etc.
Added in Clojure version 1.0
Source


->>

macro
Usage: (->> x & forms)
Threads the expr through the forms. Inserts x as thelast item in the first form, making a list of it if it is not alist already. If there are more forms, inserts the first form as thelast item in second form, etc.
Added in Clojure version 1.1
Source


->ArrayChunk

function
Usage: (->ArrayChunk am arr off end)
Positional factory function for class clojure.core.ArrayChunk.
Source


->Eduction

function
Usage: (->Eduction xform coll)
Positional factory function for class clojure.core.Eduction.
Source


->Vec

function
Usage: (->Vec am cnt shift root tail _meta)
Positional factory function for class clojure.core.Vec.
Source


->VecNode

function
Usage: (->VecNode edit arr)
Positional factory function for class clojure.core.VecNode.
Source


->VecSeq

function
Usage: (->VecSeq am vec anode i offset _meta)
Positional factory function for class clojure.core.VecSeq.
Source


.

special form
Usage: (.instanceMember instance args*)       (.instanceMember Classname args*)       (Classname/staticMethod args*)       Classname/staticField
The instance member form works for both fields and methods.They all expand into calls to the dot operator at macroexpansion time.Please seehttps://clojure.org/java_interop#dot
Added in Clojure version 1.0


..

macro
Usage: (.. x form)       (.. x form & more)
form => fieldName-symbol or (instanceMethodName-symbol args*)Expands into a member access (.) of the first member on the firstargument, followed by the next member on the result, etc. Forinstance:(.. System (getProperties) (get "os.name"))expands to:(. (. System (getProperties)) (get "os.name"))but is easier to write, read, and understand.
Added in Clojure version 1.0
Source


/

function
Usage: (/ x)       (/ x y)       (/ x y & more)
If no denominators are supplied, returns 1/numerator,else returns numerator divided by all of the denominators.
Added in Clojure version 1.0
Source


<

function
Usage: (< x)       (< x y)       (< x y & more)
Returns non-nil if nums are in monotonically increasing order,otherwise false.
Added in Clojure version 1.0
Source


<=

function
Usage: (<= x)       (<= x y)       (<= x y & more)
Returns non-nil if nums are in monotonically non-decreasing order,otherwise false.
Added in Clojure version 1.0
Source


=

function
Usage: (= x)       (= x y)       (= x y & more)
Equality. Returns true if x equals y, false if not. Same asJava x.equals(y) except it also works for nil, and comparesnumbers and collections in a type-independent manner.  Clojure's immutable datastructures define equals() (and thus =) as a value, not an identity,comparison.
Added in Clojure version 1.0
Source


==

function
Usage: (== x)       (== x y)       (== x y & more)
Returns non-nil if nums all have the equivalentvalue (type-independent), otherwise false
Added in Clojure version 1.0
Source


>

function
Usage: (> x)       (> x y)       (> x y & more)
Returns non-nil if nums are in monotonically decreasing order,otherwise false.
Added in Clojure version 1.0
Source


>=

function
Usage: (>= x)       (>= x y)       (>= x y & more)
Returns non-nil if nums are in monotonically non-increasing order,otherwise false.
Added in Clojure version 1.0
Source


NaN?

function
Usage: (NaN? num)
Returns true if num is NaN, else false
Added in Clojure version 1.11
Source


PrintWriter-on

function
Usage: (PrintWriter-on flush-fn close-fn)       (PrintWriter-on flush-fn close-fn autoflush?)
implements java.io.PrintWriter given flush-fn, which will be calledwhen .flush() is called, with a string built up since the last call to .flush().if not nil, close-fn will be called with no arguments when .close is called.autoflush? determines if the PrintWriter will autoflush, false by default.
Added in Clojure version 1.10
Source


StackTraceElement->vec

function
Usage: (StackTraceElement->vec o)
Constructs a data representation for a StackTraceElement: [class method file line]
Added in Clojure version 1.9
Source


Throwable->map

function
Usage: (Throwable->map o)
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
Added in Clojure version 1.7
Source


abs

function
Usage: (abs a)
Returns the absolute value of a.If a is Long/MIN_VALUE => Long/MIN_VALUEIf a is a double and zero => +0.0If a is a double and ##Inf or ##-Inf => ##InfIf a is a double and ##NaN => ##NaN
Added in Clojure version 1.11
Source


accessor

function
Usage: (accessor s key)
Returns a fn that, given an instance of a structmap with the basis,returns the value at the key.  The key must be in the basis. Thereturned function should be (slightly) more efficient than usingget, but such use of accessors should be limited to knownperformance-critical areas.
Added in Clojure version 1.0
Source


aclone

function
Usage: (aclone array)
Returns a clone of the Java array. Works on arrays of knowntypes.
Added in Clojure version 1.0
Source


add-classpath

function
Usage: (add-classpath url)
DEPRECATED Adds the url (String or URL object) to the classpath perURLClassLoader.addURL
Added in Clojure version 1.0
Deprecated since Clojure version 1.1
Source


add-tap

function
Usage: (add-tap f)
adds f, a fn of one argument, to the tap set. This function will be called with anything sent via tap>.This function may (briefly) block (e.g. for streams), and will never impede calls to tap>,but blocking indefinitely may cause tap values to be dropped.Remember f in order to remove-tap
Added in Clojure version 1.10
Source


add-watch

function
Usage: (add-watch reference key fn)
Adds a watch function to an agent/atom/var/ref reference. The watchfn must be a fn of 4 args: a key, the reference, its old-state, itsnew-state. Whenever the reference's state might have been changed,any registered watches will have their functions called. The watch fnwill be called synchronously, on the agent's thread if an agent,before any pending sends if agent or ref. Note that an atom's orref's state may have changed again prior to the fn call, so useold/new-state rather than derefing the reference. Note also that watchfns may be called from multiple threads simultaneously. Var watchersare triggered only by root binding changes, not thread-localset!s. Keys must be unique per reference, and can be used to removethe watch with remove-watch, but are otherwise considered opaque bythe watch mechanism.
Added in Clojure version 1.0
Source


agent

function
Usage: (agent state & options)
Creates and returns an agent with an initial value of state andzero or more options (in any order)::meta metadata-map:validator validate-fn:error-handler handler-fn:error-mode mode-keywordIf metadata-map is supplied, it will become the metadata on theagent. validate-fn must be nil or a side-effect-free fn of oneargument, which will be passed the intended new state on any statechange. If the new state is unacceptable, the validate-fn shouldreturn false or throw an exception.  handler-fn is called if anaction throws an exception or if validate-fn rejects a new state --see set-error-handler! for details.  The mode-keyword may be either:continue (the default if an error-handler is given) or :fail (thedefault if no error-handler is given) -- see set-error-mode! fordetails.
Added in Clojure version 1.0
Source


agent-error

function
Usage: (agent-error a)
Returns the exception thrown during an asynchronous action of theagent if the agent is failed.  Returns nil if the agent is notfailed.
Added in Clojure version 1.2
Source


agent-errors

function
Usage: (agent-errors a)
DEPRECATED: Use 'agent-error' instead.Returns a sequence of the exceptions thrown during asynchronousactions of the agent.
Added in Clojure version 1.0
Deprecated since Clojure version 1.2
Source


aget

function
Usage: (aget array idx)       (aget array idx & idxs)
Returns the value at the index/indices. Works on Java arrays of alltypes.
Added in Clojure version 1.0
Source


alength

function
Usage: (alength array)
Returns the length of the Java array. Works on arrays of alltypes.
Added in Clojure version 1.0
Source


alias

function
Usage: (alias alias namespace-sym)
Add an alias in the current namespace to anothernamespace. Arguments are two symbols: the alias to be used, andthe symbolic name of the target namespace. Use :as in the ns macro in preferenceto calling this directly.
Added in Clojure version 1.0
Source


all-ns

function
Usage: (all-ns)
Returns a sequence of all namespaces.
Added in Clojure version 1.0
Source


alter

function
Usage: (alter ref fun & args)
Must be called in a transaction. Sets the in-transaction-value ofref to:(apply fun in-transaction-value-of-ref args)and returns the in-transaction-value of ref.
Added in Clojure version 1.0
Source


alter-meta!

function
Usage: (alter-meta! iref f & args)
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
Added in Clojure version 1.0
Source


alter-var-root

function
Usage: (alter-var-root v f & args)
Atomically alters the root binding of var v by applying f to itscurrent value plus any args
Added in Clojure version 1.0
Source


amap

macro
Usage: (amap a idx ret expr)
Maps an expression across an array a, using an index named idx, andreturn 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.
Added in Clojure version 1.0
Source


ancestors

function
Usage: (ancestors tag)       (ancestors h tag)
Returns the immediate and indirect parents of tag, either via a Java typeinheritance relationship or a relationship established via derive. hmust be a hierarchy obtained from make-hierarchy, if not supplieddefaults to the global hierarchy
Added in Clojure version 1.0
Source


and

macro
Usage: (and)       (and x)       (and x & next)
Evaluates exprs one at a time, from left to right. If a formreturns logical false (nil or false), and returns that value anddoesn't evaluate any of the other expressions, otherwise it returnsthe value of the last expr. (and) returns true.
Added in Clojure version 1.0
Source


any?

function
Usage: (any? x)
Returns true given any argument.
Added in Clojure version 1.9
Source


apply

function
Usage: (apply f args)       (apply f x args)       (apply f x y args)       (apply f x y z args)       (apply f a b c d & args)
Applies fn f to the argument list formed by prepending intervening arguments to args.
Added in Clojure version 1.0
Source


areduce

macro
Usage: (areduce a idx ret init expr)
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.
Added in Clojure version 1.0
Source


array-map

function
Usage: (array-map)       (array-map & keyvals)
Constructs an array-map. If any keys are equal, they are handled asif by repeated uses of assoc.
Added in Clojure version 1.0
Source


as->

macro
Usage: (as-> expr name & forms)
Binds name to expr, evaluates the first form in the lexical contextof that binding, then binds name to that result, repeating for eachsuccessive form, returning the result of the last form.
Added in Clojure version 1.5
Source


aset

function
Usage: (aset array idx val)       (aset array idx idx2 & idxv)
Sets the value at the index/indices. Works on Java arrays ofreference types. Returns val.
Added in Clojure version 1.0
Source


aset-boolean

function
Usage: (aset-boolean array idx val)       (aset-boolean array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of boolean. Returns val.
Added in Clojure version 1.0
Source


aset-byte

function
Usage: (aset-byte array idx val)       (aset-byte array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of byte. Returns val.
Added in Clojure version 1.0
Source


aset-char

function
Usage: (aset-char array idx val)       (aset-char array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of char. Returns val.
Added in Clojure version 1.0
Source


aset-double

function
Usage: (aset-double array idx val)       (aset-double array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of double. Returns val.
Added in Clojure version 1.0
Source


aset-float

function
Usage: (aset-float array idx val)       (aset-float array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of float. Returns val.
Added in Clojure version 1.0
Source


aset-int

function
Usage: (aset-int array idx val)       (aset-int array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of int. Returns val.
Added in Clojure version 1.0
Source


aset-long

function
Usage: (aset-long array idx val)       (aset-long array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of long. Returns val.
Added in Clojure version 1.0
Source


aset-short

function
Usage: (aset-short array idx val)       (aset-short array idx idx2 & idxv)
Sets the value at the index/indices. Works on arrays of short. Returns val.
Added in Clojure version 1.0
Source


assert

macro
Usage: (assert x)       (assert x message)
Evaluates expression x and throws an AssertionError with optionalmessage if x does not evaluate to logical true.Assertion checks are omitted from compiled code if '*assert*' isfalse.
Added in Clojure version 1.0
Source


assoc

function
Usage: (assoc map key val)       (assoc map key val & kvs)
assoc[iate]. When applied to a map, returns a new map of thesame (hashed/sorted) type, that contains the mapping of key(s) toval(s). When applied to a vector, returns a new vector thatcontains val at index. Note - index must be <= (count vector).
Added in Clojure version 1.0
Source


assoc!

function
Usage: (assoc! coll key val)       (assoc! coll key val & kvs)
When applied to a transient map, adds mapping of key(s) toval(s). When applied to a transient vector, sets the val at index.Note - index must be <= (count vector). Returns coll.
Added in Clojure version 1.1
Source


assoc-in

function
Usage: (assoc-in m [k & ks] v)
Associates a value in a nested associative structure, where ks is asequence of keys and v is the new value and returns a new nested structure.If any levels do not exist, hash-maps will be created.
Added in Clojure version 1.0
Source


associative?

function
Usage: (associative? coll)
Returns true if coll implements Associative
Added in Clojure version 1.0
Source


atom

function
Usage: (atom x)       (atom x & options)
Creates and returns an Atom with an initial value of x and zero ormore options (in any order)::meta metadata-map:validator validate-fnIf metadata-map is supplied, it will become the metadata on theatom. validate-fn must be nil or a side-effect-free fn of oneargument, which will be passed the intended new state on any statechange. If the new state is unacceptable, the validate-fn shouldreturn false or throw an exception.
Added in Clojure version 1.0
Source


await

function
Usage: (await & agents)
Blocks the current thread (indefinitely!) until all actionsdispatched thus far, from this thread or agent, to the agent(s) haveoccurred.  Will block on failed agents.  Will never return ifa failed agent is restarted with :clear-actions true or shutdown-agents was called.
Added in Clojure version 1.0
Source


await-for

function
Usage: (await-for timeout-ms & agents)
Blocks the current thread until all actions dispatched thusfar (from this thread or agent) to the agents have occurred, or thetimeout (in milliseconds) has elapsed. Returns logical false ifreturning due to timeout, logical true otherwise.
Added in Clojure version 1.0
Source


bases

function
Usage: (bases c)
Returns the immediate superclass and direct interfaces of c, if any
Added in Clojure version 1.0
Source


bean

function
Usage: (bean x)
Takes a Java object and returns a read-only implementation of themap abstraction based upon its JavaBean properties.
Added in Clojure version 1.0
Source


bigdec

function
Usage: (bigdec x)
Coerce to BigDecimal
Added in Clojure version 1.0
Source


bigint

function
Usage: (bigint x)
Coerce to BigInt
Added in Clojure version 1.3
Source


biginteger

function
Usage: (biginteger x)
Coerce to BigInteger
Added in Clojure version 1.0
Source


binding

macro
Usage: (binding bindings & body)
binding => var-symbol init-exprCreates new bindings for the (already-existing) vars, with thesupplied initial values, executes the exprs in an implicit do, thenre-establishes the bindings that existed before.  The new bindingsare made in parallel (unlike let); all init-exprs are evaluatedbefore the vars are bound to their new values.
Added in Clojure version 1.0
Source


bit-and

function
Usage: (bit-and x y)       (bit-and x y & more)
Bitwise and
Added in Clojure version 1.0
Source


bit-and-not

function
Usage: (bit-and-not x y)       (bit-and-not x y & more)
Bitwise and with complement
Added in Clojure version 1.0
Source


bit-clear

function
Usage: (bit-clear x n)
Clear bit at index n
Added in Clojure version 1.0
Source


bit-flip

function
Usage: (bit-flip x n)
Flip bit at index n
Added in Clojure version 1.0
Source


bit-not

function
Usage: (bit-not x)
Bitwise complement
Added in Clojure version 1.0
Source


bit-or

function
Usage: (bit-or x y)       (bit-or x y & more)
Bitwise or
Added in Clojure version 1.0
Source


bit-set

function
Usage: (bit-set x n)
Set bit at index n
Added in Clojure version 1.0
Source


bit-shift-left

function
Usage: (bit-shift-left x n)
Bitwise shift left
Added in Clojure version 1.0
Source


bit-shift-right

function
Usage: (bit-shift-right x n)
Bitwise shift right
Added in Clojure version 1.0
Source


bit-test

function
Usage: (bit-test x n)
Test bit at index n
Added in Clojure version 1.0
Source


bit-xor

function
Usage: (bit-xor x y)       (bit-xor x y & more)
Bitwise exclusive or
Added in Clojure version 1.0
Source


boolean

function
Usage: (boolean x)
Coerce to boolean
Added in Clojure version 1.0
Source


boolean-array

function
Usage: (boolean-array size-or-seq)       (boolean-array size init-val-or-seq)
Creates an array of booleans
Added in Clojure version 1.1
Source


boolean?

function
Usage: (boolean? x)
Return true if x is a Boolean
Added in Clojure version 1.9
Source


booleans

function
Usage: (booleans xs)
Casts to boolean[]
Added in Clojure version 1.1
Source


bound-fn

macro
Usage: (bound-fn & fntail)
Returns a function defined by the given fntail, which will install thesame bindings in effect as in the thread at the time bound-fn was called.This may be used to define a helper function which runs on a differentthread, but needs the same bindings in place.
Added in Clojure version 1.1
Source


bound-fn*

function
Usage: (bound-fn* f)
Returns a function, which will install the same bindings in effect as inthe thread at the time bound-fn* was called and then call f with any givenarguments. This may be used to define a helper function which runs on adifferent thread, but needs the same bindings in place.
Added in Clojure version 1.1
Source


bound?

function
Usage: (bound? & vars)
Returns true if all of the vars provided as arguments have any bound value, root or thread-local.Implies that deref'ing the provided vars will succeed. Returns true if no vars are provided.
Added in Clojure version 1.2
Source


bounded-count

function
Usage: (bounded-count n coll)
If coll is counted? returns its count, else will count at most the first nelements of coll using its seq
Added in Clojure version 1.9
Source


butlast

function
Usage: (butlast coll)
Return a seq of all but the last item in coll, in linear time
Added in Clojure version 1.0
Source


byte

function
Usage: (byte x)
Coerce to byte
Added in Clojure version 1.0
Source


byte-array

function
Usage: (byte-array size-or-seq)       (byte-array size init-val-or-seq)
Creates an array of bytes
Added in Clojure version 1.1
Source


bytes

function
Usage: (bytes xs)
Casts to bytes[]
Added in Clojure version 1.1
Source


bytes?

function
Usage: (bytes? x)
Return true if x is a byte array
Added in Clojure version 1.9
Source


case

macro
Usage: (case e & clauses)
Takes an expression, and a set of clauses.Each clause can take the form of either:test-constant result-expr(test-constant1 ... test-constantN)  result-exprThe test-constants are not evaluated. They must be compile-timeliterals, and need not be quoted.  If the expression is equal to atest-constant, the corresponding result-expr is returned. A singledefault expression can follow the clauses, and its value will bereturned if no clause matches. If no default expression is providedand no clause matches, an IllegalArgumentException is thrown.Unlike cond and condp, case does a constant-time dispatch, theclauses are not considered sequentially.  All manner of constantexpressions are acceptable in case, including numbers, strings,symbols, keywords, and (Clojure) composites thereof. Note that sincelists are used to group multiple constants that map to the sameexpression, a vector can be used to match a list if needed. Thetest-constants need not be all of the same type.
Added in Clojure version 1.2
Source


cast

function
Usage: (cast c x)
Throws a ClassCastException if x is not a c, else returns x.
Added in Clojure version 1.0
Source


cat

function
Usage: (cat rf)
A transducer which concatenates the contents of each input, which must be acollection, into the reduction.
Added in Clojure version 1.7
Source


catch

special syntax
Syntax for use with try.Please seehttps://clojure.org/reference/special_forms#try
Added in Clojure version 1.0


char

function
Usage: (char x)
Coerce to char
Added in Clojure version 1.1
Source


char-array

function
Usage: (char-array size-or-seq)       (char-array size init-val-or-seq)
Creates an array of chars
Added in Clojure version 1.1
Source


char-escape-string

var
Returns escape string for char or nil if none
Added in Clojure version 1.0
Source


char-name-string

var
Returns name string for char or nil if none
Added in Clojure version 1.0
Source


char?

function
Usage: (char? x)
Return true if x is a Character
Added in Clojure version 1.0
Source


chars

function
Usage: (chars xs)
Casts to chars[]
Added in Clojure version 1.1
Source


class

function
Usage: (class x)
Returns the Class of x
Added in Clojure version 1.0
Source


class?

function
Usage: (class? x)
Returns true if x is an instance of Class
Added in Clojure version 1.0
Source


clear-agent-errors

function
Usage: (clear-agent-errors a)
DEPRECATED: Use 'restart-agent' instead.Clears any exceptions thrown during asynchronous actions of theagent, allowing subsequent actions to occur.
Added in Clojure version 1.0
Deprecated since Clojure version 1.2
Source


clojure-version

function
Usage: (clojure-version)
Returns clojure version as a printable string.
Added in Clojure version 1.0
Source


coll?

function
Usage: (coll? x)
Returns true if x implements IPersistentCollection
Added in Clojure version 1.0
Source


comment

macro
Usage: (comment & body)
Ignores body, yields nil
Added in Clojure version 1.0
Source


commute

function
Usage: (commute ref fun & args)
Must be called in a transaction. Sets the in-transaction-value ofref to:(apply fun in-transaction-value-of-ref args)and returns the in-transaction-value of ref.At the commit point of the transaction, sets the value of ref to be:(apply fun most-recently-committed-value-of-ref args)Thus fun should be commutative, or, failing that, you must acceptlast-one-in-wins behavior.  commute allows for more concurrency thanref-set.
Added in Clojure version 1.0
Source


comp

function
Usage: (comp)       (comp f)       (comp f g)       (comp f g & fs)
Takes a set of functions and returns a fn that is the compositionof those fns.  The returned fn takes a variable number of args,applies the rightmost of fns to the args, the nextfn (right-to-left) to the result, etc.
Added in Clojure version 1.0
Source


comparator

function
Usage: (comparator pred)
Returns an implementation of java.util.Comparator based upon pred.
Added in Clojure version 1.0
Source


compare

function
Usage: (compare x y)
Comparator. Returns a negative number, zero, or a positive numberwhen x is logically 'less than', 'equal to', or 'greater than'y. Same as Java x.compareTo(y) except it also works for nil, andcompares numbers and collections in a type-independent manner. xmust implement Comparable
Added in Clojure version 1.0
Source


compare-and-set!

function
Usage: (compare-and-set! atom oldval newval)
Atomically sets the value of atom to newval if and only if thecurrent value of the atom is identical to oldval. Returns true ifset happened, else false
Added in Clojure version 1.0
Source


compile

function
Usage: (compile lib)
Compiles the namespace named by the symbol lib into a set ofclassfiles. The source for the lib must be in a properclasspath-relative directory. The output files will go into thedirectory specified by *compile-path*, and that directory too mustbe in the classpath.
Added in Clojure version 1.0
Source


complement

function
Usage: (complement f)
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.
Added in Clojure version 1.0
Source


completing

function
Usage: (completing f)       (completing f cf)
Takes a reducing function f of 2 args and returns a fn suitable fortransduce by adding an arity-1 signature that calls cf (default -identity) on the result argument.
Added in Clojure version 1.7
Source


concat

function
Usage: (concat)       (concat x)       (concat x y)       (concat x y & zs)
Returns a lazy seq representing the concatenation of the elements in the supplied colls.
Added in Clojure version 1.0
Source


cond

macro
Usage: (cond & clauses)
Takes a set of test/expr pairs. It evaluates each test one at atime.  If a test returns logical true, cond evaluates and returnsthe value of the corresponding expr and doesn't evaluate any of theother tests or exprs. (cond) returns nil.
Added in Clojure version 1.0
Source


cond->

macro
Usage: (cond-> expr & clauses)
Takes an expression and a set of test/form pairs. Threads expr (via ->)through each form for which the corresponding testexpression is true. Note that, unlike cond branching, cond-> threading doesnot short circuit after the first true test expression.
Added in Clojure version 1.5
Source


cond->>

macro
Usage: (cond->> expr & clauses)
Takes an expression and a set of test/form pairs. Threads expr (via ->>)through each form for which the corresponding test expressionis true.  Note that, unlike cond branching, cond->> threading does not short circuitafter the first true test expression.
Added in Clojure version 1.5
Source


condp

macro
Usage: (condp pred expr & clauses)
Takes a binary predicate, an expression, and a set of clauses.Each clause can take the form of either:test-expr result-exprtest-expr :>> result-fnNote :>> is an ordinary keyword.For each clause, (pred test-expr expr) is evaluated. If it returnslogical true, the clause is a match. If a binary clause matches, theresult-expr is returned, if a ternary clause matches, its result-fn,which must be a unary function, is called with the result of thepredicate as its argument, the result of that call being the returnvalue of condp. A single default expression can follow the clauses,and its value will be returned if no clause matches. If no defaultexpression is provided and no clause matches, anIllegalArgumentException is thrown.
Added in Clojure version 1.0
Source


conj

function
Usage: (conj)       (conj coll)       (conj coll x)       (conj coll x & xs)
conj[oin]. Returns a new collection with the xs'added'. (conj nil item) returns (item).(conj coll) returns coll. (conj) returns [].The 'addition' may happen at different 'places' dependingon the concrete type.
Added in Clojure version 1.0
Source


conj!

function
Usage: (conj!)       (conj! coll)       (conj! coll x)
Adds x to the transient collection, and return coll. The 'addition'may happen at different 'places' depending on the concrete type.
Added in Clojure version 1.1
Source


cons

function
Usage: (cons x seq)
Returns a new seq where x is the first element and seq isthe rest.
Added in Clojure version 1.0
Source


constantly

function
Usage: (constantly x)
Returns a function that takes any number of arguments and returns x.
Added in Clojure version 1.0
Source


construct-proxy

function
Usage: (construct-proxy c & ctor-args)
Takes a proxy class and any arguments for its superclass ctor andcreates and returns an instance of the proxy.
Added in Clojure version 1.0
Source


contains?

function
Usage: (contains? coll key)
Returns true if key is present in the given collection, otherwisereturns false.  Note that for numerically indexed collections likevectors and Java arrays, this tests if the numeric key is within therange of indexes. 'contains?' operates constant or logarithmic time;it will not perform a linear search for a value.  See also 'some'.
Added in Clojure version 1.0
Source


count

function
Usage: (count coll)
Returns the number of items in the collection. (count nil) returns0.  Also works on strings, arrays, and Java Collections and Maps
Added in Clojure version 1.0
Source


counted?

function
Usage: (counted? coll)
Returns true if coll implements count in constant time
Added in Clojure version 1.0
Source


create-ns

function
Usage: (create-ns sym)
Create a new namespace named by the symbol if one doesn't alreadyexist, returns it or the already-existing namespace of the samename.
Added in Clojure version 1.0
Source


create-struct

function
Usage: (create-struct & keys)
Returns a structure basis object.
Added in Clojure version 1.0
Source


cycle

function
Usage: (cycle coll)
Returns a lazy (infinite!) sequence of repetitions of the items in coll.
Added in Clojure version 1.0
Source


dec

function
Usage: (dec x)
Returns a number one less than num. Does not auto-promotelongs, will throw on overflow. See also: dec'
Added in Clojure version 1.2
Source


dec'

function
Usage: (dec' x)
Returns a number one less than num. Supports arbitrary precision.See also: dec
Added in Clojure version 1.0
Source


decimal?

function
Usage: (decimal? n)
Returns true if n is a BigDecimal
Added in Clojure version 1.0
Source


declare

macro
Usage: (declare & names)
defs the supplied var names with no bindings, useful for making forward declarations.
Added in Clojure version 1.0
Source


dedupe

function
Usage: (dedupe)       (dedupe coll)
Returns a lazy sequence removing consecutive duplicates in coll.Returns a transducer when no collection is provided.
Added in Clojure version 1.7
Source


def

special form
Usage: (def symbol doc-string? init?)
Creates and interns a global var with the nameof symbol in the current namespace (*ns*) or locates such a var ifit already exists.  If init is supplied, it is evaluated, and theroot binding of the var is set to the resulting value.  If init isnot supplied, the root binding of the var is unaffected.Please seehttps://clojure.org/reference/special_forms#def
Added in Clojure version 1.0


default-data-readers

var
Default map of data reader functions provided by Clojure. May beoverridden by binding *data-readers*.
Added in Clojure version 1.4
Source


definline

macro
Usage: (definline name & decl)
Experimental - like defmacro, except defines a named function whosebody is the expansion, calls to which may be expanded inline as ifit were a macro. Cannot be used with variadic (&) args.
Added in Clojure version 1.0
Source


definterface

macro
Usage: (definterface name & sigs)
Creates a new Java interface with the given name and method sigs.The method return types and parameter types may be specified with type hints,defaulting to Object if omitted.(definterface MyInterface  (^int method1 [x])  (^Bar method2 [^Baz b ^Quux q]))
Added in Clojure version 1.2
Source


defmacro

macro
Usage: (defmacro name doc-string? attr-map? [params*] body)       (defmacro name doc-string? attr-map? ([params*] body) + attr-map?)
Like defn, but the resulting function name is declared as amacro and will be used as a macro by the compiler when it iscalled.
Added in Clojure version 1.0
Source


defmethod

macro
Usage: (defmethod multifn dispatch-val & fn-tail)
Creates and installs a new method of multimethod associated with dispatch-value.
Added in Clojure version 1.0
Source


defmulti

macro
Usage: (defmulti name docstring? attr-map? dispatch-fn & options)
Creates a new multimethod with the associated dispatch function.The docstring and attr-map are optional.Options are key-value pairs and may be one of::defaultThe default dispatch value, defaults to :default:hierarchyThe value used for hierarchical dispatch (e.g. ::square is-a ::shape)Hierarchies are type-like relationships that do not depend upon typeinheritance. By default Clojure's multimethods dispatch off of aglobal hierarchy map.  However, a hierarchy relationship can becreated with the derive function used to augment the root ancestorcreated with make-hierarchy.Multimethods expect the value of the hierarchy option to be supplied asa reference type e.g. a var (i.e. via the Var-quote dispatch macro #'or the var special form).
Added in Clojure version 1.0
Source


defn

macro
Usage: (defn name doc-string? attr-map? [params*] prepost-map? body)       (defn name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?)
Same as (def name (fn [params* ] exprs*)) or (defname (fn ([params* ] exprs*)+)) with any doc-string or attrs addedto the var metadata. prepost-map defines a map with optional keys:pre and :post that contain collections of pre or post conditions.
Specs:  Args: (fspec          :args          :clojure.core.specs.alpha/defn-args          :ret          any?          :fn          nil)  Ret:  (fspec          :args          :clojure.core.specs.alpha/defn-args          :ret          any?          :fn          nil)
Added in Clojure version 1.0
Source


defn-

macro
Usage: (defn- name & decls)
same as defn, yielding non-public def
Specs:  Args: (fspec          :args          :clojure.core.specs.alpha/defn-args          :ret          any?          :fn          nil)  Ret:  (fspec          :args          :clojure.core.specs.alpha/defn-args          :ret          any?          :fn          nil)
Added in Clojure version 1.0
Source


defonce

macro
Usage: (defonce name expr)
defs name to have the root value of the expr iff the named var has no root value,else expr is unevaluated
Added in Clojure version 1.0
Source


defprotocol

macro
Usage: (defprotocol name & opts+sigs)
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. Docs can be specified for theprotocol overall and for each method. The above yields a set ofpolymorphic functions and a protocol object. All arenamespace-qualified by the ns enclosing the definition The resultingfunctions dispatch on the type of their first argument, which isrequired and corresponds to the implicit target object ('this' in Java parlance). defprotocol is dynamic, has no special compile-time effect, and defines no new types or classes. Implementations of the protocol methods can be provided using extend.When :extend-via-metadata is true, values can extend protocols byadding metadata where keys are fully-qualified protocol functionsymbols and values are function implementations. Protocolimplementations are checked first for direct definitions (defrecord,deftype, reify), then metadata definitions, then externalextensions (extend, extend-type, extend-protocol)defprotocol will automatically generate a corresponding interface,with the same name as the protocol, i.e. given a protocol:my.ns/Protocol, an interface: my.ns.Protocol. The interface willhave methods corresponding to the protocol functions, and theprotocol will automatically work with instances of the interface.Note that you should not use this interface with deftype orreify, as they support the protocol directly:(defprotocol P   (foo [this])   (bar-me [this] [this y]))(deftype Foo [a b c]  P  (foo [this] a)  (bar-me [this] b)  (bar-me [this y] (+ c y)))(bar-me (Foo. 1 2 3) 42)=> 45(foo   (let [x 42]    (reify P       (foo [this] 17)      (bar-me [this] x)      (bar-me [this y] x))))=> 17
Added in Clojure version 1.2
Source


defrecord

macro
Usage: (defrecord name [& fields] & opts+specs)
(defrecord name [fields*]  options* specs*)Options are expressed as sequential keywords and arguments (in any order).Supported options::load-ns - if true, importing the record class will cause the           namespace in which the record was defined to be loaded.           Defaults to false.Each spec consists of a protocol or interface name followed by zeroor more method bodies:protocol-or-interface-or-Object(methodName [args*] body)*Dynamically generates compiled bytecode for class with the givenname, in a package with the same name as the current namespace, thegiven fields, and, optionally, methods for protocols and/orinterfaces.The class will have the (immutable) fields named byfields, which can have type hints. Protocols/interfaces and methodsare optional. The only methods that can be supplied are thosedeclared in the protocols/interfaces.  Note that method bodies arenot closures, the local environment includes only the named fields,and those fields can be accessed directly.Method definitions take the form:(methodname [args*] body)The argument and return types can be hinted on the arg andmethodname symbols. If not supplied, they will be inferred, so typehints should be reserved for disambiguation.Methods should be supplied for all methods of the desiredprotocol(s) and interface(s). You can also define overrides formethods of Object. Note that a parameter must be supplied tocorrespond to the target object ('this' in Java parlance). Thusmethods for interfaces will take one more argument than do theinterface declarations. Note also that recur calls to the methodhead should *not* pass the target object, it will be suppliedautomatically and can not be substituted.In the method bodies, the (unqualified) name can be used to name theclass (for calls to new, instance? etc).The class will have implementations of several (clojure.lang)interfaces generated automatically: IObj (metadata support) andIPersistentMap, and all of their superinterfaces.In addition, defrecord will define type-and-value-based =,and will defined Java .hashCode and .equals consistent with thecontract for java.util.Map.When AOT compiling, generates compiled bytecode for a class with thegiven name (a symbol), prepends the current ns as the package, andwrites the .class file to the *compile-path* directory.Two constructors will be defined, one taking the designated fieldsfollowed by a metadata map (nil for none) and an extension fieldmap (nil for none), and one taking only the fields (using nil formeta and extension fields). Note that the field names __meta,__extmap, __hash and __hasheq are currently reserved and should notbe used when defining your own records.Given (defrecord TypeName ...), two factory functions will bedefined: ->TypeName, taking positional parameters for the fields,and map->TypeName, taking a map of keywords to field values.
Added in Clojure version 1.2
Source


defstruct

macro
Usage: (defstruct name & keys)
Same as (def name (create-struct keys...))
Added in Clojure version 1.0
Source


deftype

macro
Usage: (deftype name [& fields] & opts+specs)
(deftype name [fields*]  options* specs*)Options are expressed as sequential keywords and arguments (in any order).Supported options::load-ns - if true, importing the type class will cause the           namespace in which the type was defined to be loaded.           Defaults to false.Each spec consists of a protocol or interface name followed by zeroor more method bodies:protocol-or-interface-or-Object(methodName [args*] body)*Dynamically generates compiled bytecode for class with the givenname, in a package with the same name as the current namespace, thegiven fields, and, optionally, methods for protocols and/orinterfaces. The class will have the (by default, immutable) fields named byfields, which can have type hints. Protocols/interfaces and methodsare optional. The only methods that can be supplied are thosedeclared in the protocols/interfaces.  Note that method bodies arenot closures, the local environment includes only the named fields,and those fields can be accessed directly. Fields can be qualifiedwith the metadata :volatile-mutable true or :unsynchronized-mutabletrue, at which point (set! afield aval) will be supported in methodbodies. Note well that mutable fields are extremely difficult to usecorrectly, and are present only to facilitate the building of higherlevel constructs, such as Clojure's reference types, in Clojureitself. They are for experts only - if the semantics andimplications of :volatile-mutable or :unsynchronized-mutable are notimmediately apparent to you, you should not be using them.Method definitions take the form:(methodname [args*] body)The argument and return types can be hinted on the arg andmethodname symbols. If not supplied, they will be inferred, so typehints should be reserved for disambiguation.Methods should be supplied for all methods of the desiredprotocol(s) and interface(s). You can also define overrides formethods of Object. Note that a parameter must be supplied tocorrespond to the target object ('this' in Java parlance). Thusmethods for interfaces will take one more argument than do theinterface declarations. Note also that recur calls to the methodhead should *not* pass the target object, it will be suppliedautomatically and can not be substituted.In the method bodies, the (unqualified) name can be used to name theclass (for calls to new, instance? etc).When AOT compiling, generates compiled bytecode for a class with thegiven name (a symbol), prepends the current ns as the package, andwrites the .class file to the *compile-path* directory.One constructor will be defined, taking the designated fields.  Notethat the field names __meta, __extmap, __hash and __hasheq are currentlyreserved and should not be used when defining your own types.Given (deftype TypeName ...), a factory function called ->TypeNamewill be defined, taking positional parameters for the fields
Added in Clojure version 1.2
Source


delay

macro
Usage: (delay & body)
Takes a body of expressions and yields a Delay object that willinvoke the body only the first time it is forced (with force or deref/@), andwill cache the result and return it on all subsequent forcecalls. See also - realized?
Added in Clojure version 1.0
Source


delay?

function
Usage: (delay? x)
returns true if x is a Delay created with delay
Added in Clojure version 1.0
Source


deliver

function
Usage: (deliver promise val)
Delivers the supplied value to the promise, releasing any pendingderefs. A subsequent call to deliver on a promise will have no effect.
Added in Clojure version 1.1
Source


denominator

function
Usage: (denominator r)
Returns the denominator part of a Ratio.
Added in Clojure version 1.2
Source


deref

function
Usage: (deref ref)       (deref ref timeout-ms timeout-val)
Also reader macro: @ref/@agent/@var/@atom/@delay/@future/@promise. Within a transaction,returns the in-transaction-value of ref, else returns themost-recently-committed value of ref. When applied to a var, agentor atom, returns its current state. When applied to a delay, forcesit if not already forced. When applied to a future, will block ifcomputation not complete. When applied to a promise, will blockuntil a value is delivered.  The variant taking a timeout can beused for blocking references (futures and promises), and will returntimeout-val if the timeout (in milliseconds) is reached before avalue is available. See also - realized?.
Added in Clojure version 1.0
Source


derive

function
Usage: (derive tag parent)       (derive h tag parent)
Establishes a parent/child relationship between parent andtag. Parent must be a namespace-qualified symbol or keyword andchild can be either a namespace-qualified symbol or keyword or aclass. h must be a hierarchy obtained from make-hierarchy, if notsupplied defaults to, and modifies, the global hierarchy.
Added in Clojure version 1.0
Source


descendants

function
Usage: (descendants tag)       (descendants h tag)
Returns the immediate and indirect children of tag, through arelationship established via derive. h must be a hierarchy obtainedfrom make-hierarchy, if not supplied defaults to the globalhierarchy. Note: does not work on Java type inheritancerelationships.
Added in Clojure version 1.0
Source


disj

function
Usage: (disj set)       (disj set key)       (disj set key & ks)
disj[oin]. Returns a new set of the same (hashed/sorted) type, thatdoes not contain key(s).
Added in Clojure version 1.0
Source


disj!

function
Usage: (disj! set)       (disj! set key)       (disj! set key & ks)
disj[oin]. Returns a transient set of the same (hashed/sorted) type, thatdoes not contain key(s).
Added in Clojure version 1.1
Source


dissoc

function
Usage: (dissoc map)       (dissoc map key)       (dissoc map key & ks)
dissoc[iate]. Returns a new map of the same (hashed/sorted) type,that does not contain a mapping for key(s).
Added in Clojure version 1.0
Source


dissoc!

function
Usage: (dissoc! map key)       (dissoc! map key & ks)
Returns a transient map that doesn't contain a mapping for key(s).
Added in Clojure version 1.1
Source


distinct

function
Usage: (distinct)       (distinct coll)
Returns a lazy sequence of the elements of coll with duplicates removed.Returns a stateful transducer when no collection is provided.
Added in Clojure version 1.0
Source


distinct?

function
Usage: (distinct? x)       (distinct? x y)       (distinct? x y & more)
Returns true if no two of the arguments are =
Added in Clojure version 1.0
Source


do

special form
Usage: (do exprs*)
Evaluates the expressions in order and returns the value ofthe last. If no expressions are supplied, returns nil.Please seehttps://clojure.org/reference/special_forms#do
Added in Clojure version 1.0


doall

function
Usage: (doall coll)       (doall n coll)
When lazy sequences are produced via functions that have sideeffects, any effects other than those needed to produce the firstelement in the seq do not occur until the seq is consumed. doall canbe used to force any effects. Walks through the successive nexts ofthe seq, retains the head and returns it, thus causing the entireseq to reside in memory at one time.
Added in Clojure version 1.0
Source


dorun

function
Usage: (dorun coll)       (dorun n coll)
When lazy sequences are produced via functions that have sideeffects, any effects other than those needed to produce the firstelement in the seq do not occur until the seq is consumed. dorun canbe used to force any effects. Walks through the successive nexts ofthe seq, does not retain the head and returns nil.
Added in Clojure version 1.0
Source


doseq

macro
Usage: (doseq seq-exprs & body)
Repeatedly executes body (presumably for side-effects) withbindings and filtering as provided by "for".  Does not retainthe head of the sequence. Returns nil.
Added in Clojure version 1.0
Source


dosync

macro
Usage: (dosync & exprs)
Runs the exprs (in an implicit do) in a transaction that encompassesexprs and any nested calls.  Starts a transaction if none is alreadyrunning on this thread. Any uncaught exception will abort thetransaction and flow out of dosync. The exprs may be run more thanonce, but any effects on Refs will be atomic.
Added in Clojure version 1.0
Source


dotimes

macro
Usage: (dotimes bindings & body)
bindings => name nRepeatedly executes body (presumably for side-effects) with namebound to integers from 0 through n-1.
Added in Clojure version 1.0
Source


doto

macro
Usage: (doto x & forms)
Evaluates x then calls all of the methods and functions with thevalue of x supplied at the front of the given arguments.  The formsare evaluated in order.  Returns x.(doto (new java.util.HashMap) (.put "a" 1) (.put "b" 2))
Added in Clojure version 1.0
Source


double

function
Usage: (double x)
Coerce to double
Added in Clojure version 1.0
Source


double-array

function
Usage: (double-array size-or-seq)       (double-array size init-val-or-seq)
Creates an array of doubles
Added in Clojure version 1.0
Source


double?

function
Usage: (double? x)
Return true if x is a Double
Added in Clojure version 1.9
Source


doubles

function
Usage: (doubles xs)
Casts to double[]
Added in Clojure version 1.0
Source


drop

function
Usage: (drop n)       (drop n coll)
Returns a laziness-preserving sequence of all but the first n items in coll.Returns a stateful transducer when no collection is provided.
Added in Clojure version 1.0
Source


drop-last

function
Usage: (drop-last coll)       (drop-last n coll)
Return a lazy sequence of all but the last n (default 1) items in coll
Added in Clojure version 1.0
Source


drop-while

function
Usage: (drop-while pred)       (drop-while pred coll)
Returns a lazy sequence of the items in coll starting from thefirst item for which (pred item) returns logical false.  Returns astateful transducer when no collection is provided.
Added in Clojure version 1.0
Source


eduction

function
Usage: (eduction xform* coll)
Returns a reducible/iterable application of the transducersto the items in coll. Transducers are applied in order as ifcombined with comp. Note that these applications will beperformed every time reduce/iterator is called.
Added in Clojure version 1.7
Source


empty

function
Usage: (empty coll)
Returns an empty collection of the same category as coll, or nil
Added in Clojure version 1.0
Source


empty?

function
Usage: (empty? coll)
Returns true if coll has no items. To check the emptiness of a seq,please use the idiom (seq x) rather than (not (empty? x))
Added in Clojure version 1.0
Source


ensure

function
Usage: (ensure ref)
Must be called in a transaction. Protects the ref from modificationby other transactions.  Returns the in-transaction-value ofref. Allows for more concurrency than (ref-set ref @ref)
Added in Clojure version 1.0
Source


ensure-reduced

function
Usage: (ensure-reduced x)
If x is already reduced?, returns it, else returns (reduced x)
Added in Clojure version 1.7
Source


enumeration-seq

function
Usage: (enumeration-seq e)
Returns a seq on a java.util.Enumeration
Added in Clojure version 1.0
Source


error-handler

function
Usage: (error-handler a)
Returns the error-handler of agent a, or nil if there is none.See set-error-handler!
Added in Clojure version 1.2
Source


error-mode

function
Usage: (error-mode a)
Returns the error-mode of agent a.  See set-error-mode!
Added in Clojure version 1.2
Source


eval

function
Usage: (eval form)
Evaluates the form data structure (not text!) and returns the result.
Added in Clojure version 1.0
Source


even?

function
Usage: (even? n)
Returns true if n is even, throws an exception if n is not an integer
Added in Clojure version 1.0
Source


every-pred

function
Usage: (every-pred p)       (every-pred p1 p2)       (every-pred p1 p2 p3)       (every-pred p1 p2 p3 & ps)
Takes a set of predicates and returns a function f that returns true if all of itscomposing predicates return a logical true value against all of its arguments, else it returnsfalse. Note that f is short-circuiting in that it will stop execution on the firstargument that triggers a logical false result against the original predicates.
Added in Clojure version 1.3
Source


every?

function
Usage: (every? pred coll)
Returns true if (pred x) is logical true for every x in coll, elsefalse.
Added in Clojure version 1.0
Source


ex-cause

function
Usage: (ex-cause ex)
Returns the cause of ex if ex is a Throwable.Otherwise returns nil.
Added in Clojure version 1.10
Source


ex-data

function
Usage: (ex-data ex)
Returns exception data (a map) if ex is an IExceptionInfo.Otherwise returns nil.
Added in Clojure version 1.4
Source


ex-info

function
Usage: (ex-info msg map)       (ex-info msg map cause)
Create an instance of ExceptionInfo, a RuntimeException subclassthat carries a map of additional data.
Added in Clojure version 1.4
Source


ex-message

function
Usage: (ex-message ex)
Returns the message attached to ex if ex is a Throwable.Otherwise returns nil.
Added in Clojure version 1.10
Source


extend

function
Usage: (extend atype & proto+mmaps)
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. It will extend the polymorphism of the protocol's methods to call the supplied methods when an AType is provided as the first argument.  Method maps are maps of the keyword-ized method names to ordinary fns. This facilitates easy reuse of existing fns and fn maps, for code reuse/mixins without derivation or composition. You can extend an interface to a protocol. This is primarily to facilitate interop with the host (e.g. Java) but opens the door to incidental multiple inheritance of implementation since a class can inherit from more than one interface, both of which extend the protocol. It is TBD how to specify which impl to use. You can extend a protocol on nil. If you are supplying the definitions explicitly (i.e. not reusing exsting functions or mixin maps), you may find it more convenient to use the extend-type or extend-protocol macros. Note that multiple independent extend clauses can exist for the same type, not all protocols need be defined in a single extend call. See also: extends?, satisfies?, extenders
Added in Clojure version 1.2
Source


extend-protocol

macro
Usage: (extend-protocol p & specs)
Useful when you want to provide several implementations of the sameprotocol all at once. Takes a single protocol and the implementationof that protocol for one or more types. Expands into calls toextend-type:(extend-protocol Protocol  AType    (foo [x] ...)    (bar [x y] ...)  BType    (foo [x] ...)    (bar [x y] ...)  AClass    (foo [x] ...)    (bar [x y] ...)  nil    (foo [x] ...)    (bar [x y] ...))expands into:(do (clojure.core/extend-type AType Protocol    (foo [x] ...)    (bar [x y] ...)) (clojure.core/extend-type BType Protocol    (foo [x] ...)    (bar [x y] ...)) (clojure.core/extend-type AClass Protocol    (foo [x] ...)    (bar [x y] ...)) (clojure.core/extend-type nil Protocol    (foo [x] ...)    (bar [x y] ...)))
Added in Clojure version 1.2
Source


extend-type

macro
Usage: (extend-type t & specs)
A macro that expands into an extend call. Useful when you aresupplying the definitions explicitly inline, extend-typeautomatically creates the maps required by extend.  Propagates theclass as a type hint on the first argument of all fns.(extend-type MyType   Countable    (cnt [c] ...)  Foo    (bar [x y] ...)    (baz ([x] ...) ([x y & zs] ...)))expands into:(extend MyType Countable   {:cnt (fn [c] ...)} Foo   {:baz (fn ([x] ...) ([x y & zs] ...))    :bar (fn [x y] ...)})
Added in Clojure version 1.2
Source


extenders

function
Usage: (extenders protocol)
Returns a collection of the types explicitly extending protocol
Added in Clojure version 1.2
Source


extends?

function
Usage: (extends? protocol atype)
Returns true if atype extends protocol
Added in Clojure version 1.2
Source


false?

function
Usage: (false? x)
Returns true if x is the value false, false otherwise.
Added in Clojure version 1.0
Source


ffirst

function
Usage: (ffirst x)
Same as (first (first x))
Added in Clojure version 1.0
Source


file-seq

function
Usage: (file-seq dir)
A tree seq on java.io.Files
Added in Clojure version 1.0
Source


filter

function
Usage: (filter pred)       (filter pred coll)
Returns a lazy sequence of the items in coll for which(pred item) returns logical true. pred must be free of side-effects.Returns a transducer when no collection is provided.
Added in Clojure version 1.0
Source


filterv

function
Usage: (filterv pred coll)
Returns a vector of the items in coll for which(pred item) returns logical true. pred must be free of side-effects.
Added in Clojure version 1.4
Source


finally

special syntax
Syntax for use with try.Please seehttps://clojure.org/reference/special_forms#try
Added in Clojure version 1.0


find

function
Usage: (find map key)
Returns the map entry for key, or nil if key not present.
Added in Clojure version 1.0
Source


find-keyword

function
Usage: (find-keyword name)       (find-keyword ns name)
Returns a Keyword with the given namespace and name if one alreadyexists.  This function will not intern a new keyword. If the keywordhas not already been interned, it will return nil.  Do not use :in the keyword strings, it will be added automatically.
Added in Clojure version 1.3
Source


find-ns

function
Usage: (find-ns sym)
Returns the namespace named by the symbol or nil if it doesn't exist.
Added in Clojure version 1.0
Source


find-var

function
Usage: (find-var sym)
Returns the global var named by the namespace-qualified symbol, ornil if no var with that name.
Added in Clojure version 1.0
Source


first

function
Usage: (first coll)
Returns the first item in the collection. Calls seq on itsargument. If coll is nil, returns nil.
Added in Clojure version 1.0
Source


flatten

function
Usage: (flatten x)
Takes any nested combination of sequential things (lists, vectors,etc.) and returns their contents as a single, flat lazy sequence.(flatten nil) returns an empty sequence.
Added in Clojure version 1.2
Source


float

function
Usage: (float x)
Coerce to float
Added in Clojure version 1.0
Source


float-array

function
Usage: (float-array size-or-seq)       (float-array size init-val-or-seq)
Creates an array of floats
Added in Clojure version 1.0
Source


float?

function
Usage: (float? n)
Returns true if n is a floating point number
Added in Clojure version 1.0
Source


floats

function
Usage: (floats xs)
Casts to float[]
Added in Clojure version 1.0
Source


flush

function
Usage: (flush)
Flushes the output stream that is the current value of*out*
Added in Clojure version 1.0
Source


fn

special form
Usage: (fn name? [params*] exprs*)       (fn name? ([params*] exprs*) +)
params => positional-params*, or positional-params* & rest-parampositional-param => binding-formrest-param => binding-formbinding-form => name, or destructuring-formDefines a function.Seehttps://clojure.org/reference/special_forms#fn for more information
Specs:  Args: (fspec          :args          (cat           :fn-name (? simple-symbol?)           :fn-tail (alt                     :arity-1 :clojure.core.specs.alpha/params+body                     :arity-n (+                                (spec                                  :clojure.core.specs.alpha/params+body))))          :ret          any?          :fn          nil)  Ret:  (fspec          :args          (cat           :fn-name (? simple-symbol?)           :fn-tail (alt                     :arity-1 :clojure.core.specs.alpha/params+body                     :arity-n (+                                (spec                                  :clojure.core.specs.alpha/params+body))))          :ret          any?          :fn          nil)
Added in Clojure version 1.0
Source


fn?

function
Usage: (fn? x)
Returns true if x implements Fn, i.e. is an object created via fn.
Added in Clojure version 1.0
Source


fnext

function
Usage: (fnext x)
Same as (first (next x))
Added in Clojure version 1.0
Source


fnil

function
Usage: (fnil f x)       (fnil f x y)       (fnil f x y z)
Takes a function f, and returns a function that calls f, replacinga nil first argument to f with the supplied value x. Higher arityversions can replace arguments in the second and thirdpositions (y, z). Note that the function f can take any number ofarguments, not just the one(s) being nil-patched.
Added in Clojure version 1.2
Source


for

macro
Usage: (for seq-exprs body-expr)
List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost fastest, and nested coll-exprs can refer to bindings created in prior binding-forms.  Supported modifiers are: :let [binding-form expr ...], :while test, :when test.(take 100 (for [x (range 100000000) y (range 1000000) :while (< y x)] [x y]))
Added in Clojure version 1.0
Source


force

function
Usage: (force x)
If x is a Delay, returns the (possibly cached) value of its expression, else returns x
Added in Clojure version 1.0
Source


format

function
Usage: (format fmt & args)
Formats a string using java.lang.String.format, see java.util.Formatter for formatstring syntax
Added in Clojure version 1.0
Source


frequencies

function
Usage: (frequencies coll)
Returns a map from distinct items in coll to the number of timesthey appear.
Added in Clojure version 1.2
Source


future

macro
Usage: (future & body)
Takes a body of expressions and yields a future object that willinvoke the body in another thread, and will cache the result andreturn it on all subsequent calls to deref/@. If the computation hasnot yet finished, calls to deref/@ will block, unless the variant ofderef with timeout is used. See also - realized?.
Added in Clojure version 1.1
Source


future-call

function
Usage: (future-call f)
Takes a function of no args and yields a future object that willinvoke the function in another thread, and will cache the result andreturn it on all subsequent calls to deref/@. If the computation hasnot yet finished, calls to deref/@ will block, unless the variantof deref with timeout is used. See also - realized?.
Added in Clojure version 1.1
Source


future-cancel

function
Usage: (future-cancel f)
Cancels the future, if possible.
Added in Clojure version 1.1
Source


future-cancelled?

function
Usage: (future-cancelled? f)
Returns true if future f is cancelled
Added in Clojure version 1.1
Source


future-done?

function
Usage: (future-done? f)
Returns true if future f is done
Added in Clojure version 1.1
Source


future?

function
Usage: (future? x)
Returns true if x is a future
Added in Clojure version 1.1
Source


gen-class

macro
Usage: (gen-class & options)
When compiling, generates compiled bytecode for a class with thegiven package-qualified :name (which, as all names in theseparameters, can be a string or symbol), and writes the .class fileto the *compile-path* directory.  When not compiling, doesnothing. The gen-class construct contains no implementation, as theimplementation will be dynamically sought by the generated class infunctions in an implementing Clojure namespace. Given a generatedclass org.mydomain.MyClass with a method named mymethod, gen-classwill generate an implementation that looks for a function named by (str prefix mymethod) (default prefix: "-") in aClojure namespace specified by :impl-ns(defaults to the current namespace). All inherited methods,generated methods, and init and main functions (see :methods, :init,and :main below) will be found similarly prefixed. By default, thestatic initializer for the generated class will attempt to load theClojure support code for the class as a resource from the classpath,e.g. in the example case, ``org/mydomain/MyClass__init.class``. Thisbehavior can be controlled by :load-impl-nsNote that methods with a maximum of 18 parameters are supported.In all subsequent sections taking types, the primitive types can bereferred to by their Java names (int, float etc), and classes in thejava.lang package can be used without a package qualifier. All otherclasses must be fully qualified.Options should be a set of key/value pairs, all except for :name are optional::name anameThe package-qualified name of the class to be generated:extends aclassSpecifies the superclass, the non-private methods of which will beoverridden by the class. If not provided, defaults to Object.:implements [interface ...]One or more interfaces, the methods of which will be implemented by the class.:init nameIf supplied, names a function that will be called with the argumentsto the constructor. Must return [ [superclass-constructor-args] state] If not supplied, the constructor args are passed directly tothe superclass constructor and the state will be nil:constructors {[param-types] [super-param-types], ...}By default, constructors are created for the generated class whichmatch the signature(s) of the constructors for the superclass. Thisparameter may be used to explicitly specify constructors, each entryproviding a mapping from a constructor signature to a superclassconstructor signature. When you supply this, you must supply an :initspecifier. :post-init nameIf supplied, names a function that will be called with the object asthe first argument, followed by the arguments to the constructor.It will be called every time an object of this class is created,immediately after all the inherited constructors have completed.Its return value is ignored.:methods [ [name [param-types] return-type], ...]The generated class automatically defines all of the non-privatemethods of its superclasses/interfaces. This parameter can be usedto specify the signatures of additional methods of the generatedclass. Static methods can be specified with ^{:static true} in thesignature's metadata. Do not repeat superclass/interface signatureshere.:main booleanIf supplied and true, a static public main function will be generated. It willpass each string of the String[] argument as a separate argument toa function called (str prefix main).:factory nameIf supplied, a (set of) public static factory function(s) will becreated with the given name, and the same signature(s) as theconstructor(s).:state nameIf supplied, a public final instance field with the given name will becreated. You must supply an :init function in order to provide avalue for the state. Note that, though final, the state can be a refor agent, supporting the creation of Java objects with transactionalor asynchronous mutation semantics.:exposes {protected-field-name {:get name :set name}, ...}Since the implementations of the methods of the generated classoccur in Clojure functions, they have no access to the inheritedprotected fields of the superclass. This parameter can be used togenerate public getter/setter methods exposing the protected field(s)for use in the implementation.:exposes-methods {super-method-name exposed-name, ...}It is sometimes necessary to call the superclass' implementation of anoverridden method.  Those methods may be exposed and referred in the new method implementation by a local name.:prefix stringDefault: "-" Methods called e.g. Foo will be looked up in vars calledprefixFoo in the implementing ns.:impl-ns nameDefault: the name of the current ns. Implementations of methods will be looked up in this namespace.:load-impl-ns booleanDefault: true. Causes the static initializer for the generated classto reference the load code for the implementing namespace. Should betrue when implementing-ns is the default, false if you intend toload the code via some other method.
Added in Clojure version 1.0
Source


gen-interface

macro
Usage: (gen-interface & options)
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.  When not compiling, does nothing. In all subsequent sections taking types, the primitive types can be referred to by their Java names (int, float etc), and classes in the java.lang package can be used without a package qualifier. All other classes must be fully qualified. Options should be a set of key/value pairs, all except for :name are optional: :name aname The package-qualified name of the class to be generated :extends [interface ...] One or more interfaces, which will be extended by this interface. :methods [ [name [param-types] return-type], ...] This parameter is used to specify the signatures of the methods of the generated interface.  Do not repeat superinterface signatures here.
Added in Clojure version 1.0
Source


gensym

function
Usage: (gensym)       (gensym prefix-string)
Returns a new symbol with a unique name. If a prefix string issupplied, the name is prefix# where # is some unique number. Ifprefix is not supplied, the prefix is 'G__'.
Added in Clojure version 1.0
Source


get

function
Usage: (get map key)       (get map key not-found)
Returns the value mapped to key, not-found or nil if key not presentin associative collection, set, string, array, or ILookup instance.
Added in Clojure version 1.0
Source


get-in

function
Usage: (get-in m ks)       (get-in m ks not-found)
Returns the value in a nested associative structure,where ks is a sequence of keys. Returns nil if the keyis not present, or the not-found value if supplied.
Added in Clojure version 1.2
Source


get-method

function
Usage: (get-method multifn dispatch-val)
Given a multimethod and a dispatch value, returns the dispatch fnthat would apply to that value, or nil if none apply and no default
Added in Clojure version 1.0
Source


get-proxy-class

function
Usage: (get-proxy-class & bases)
Takes an optional single class followed by zero or moreinterfaces. If not supplied class defaults to Object.  Creates anreturns an instance of a proxy class derived from the suppliedclasses. The resulting value is cached and used for any subsequentrequests for the same class set. Returns a Class object.
Added in Clojure version 1.0
Source


get-thread-bindings

function
Usage: (get-thread-bindings)
Get a map with the Var/value pairs which is currently in effect for thecurrent thread.
Added in Clojure version 1.1
Source


get-validator

function
Usage: (get-validator iref)
Gets the validator-fn for a var/ref/agent/atom.
Added in Clojure version 1.0
Source


group-by

function
Usage: (group-by f coll)
Returns a map of the elements of coll keyed by the result off on each element. The value at each key will be a vector of thecorresponding elements, in the order they appeared in coll.
Added in Clojure version 1.2
Source


halt-when

function
Usage: (halt-when pred)       (halt-when pred retf)
Returns a transducer that ends transduction when pred returns truefor an input. When retf is supplied it must be a fn of 2 arguments -it will be passed the (completed) result so far and the input thattriggered the predicate, and its return value (if it does not throwan exception) will be the return value of the transducer. If retfis not supplied, the input that triggered the predicate will bereturned. If the predicate never returns true the transduction isunaffected.
Added in Clojure version 1.9
Source


hash

function
Usage: (hash x)
Returns the hash code of its argument. Note this is the hash codeconsistent with =, and thus is different than .hashCode for Integer,Short, Byte and Clojure collections.
Added in Clojure version 1.0
Source


hash-map

function
Usage: (hash-map)       (hash-map & keyvals)
keyval => key valReturns a new hash map with supplied mappings.  If any keys areequal, they are handled as if by repeated uses of assoc.
Added in Clojure version 1.0
Source


hash-ordered-coll

function
Usage: (hash-ordered-coll coll)
Returns the hash code, consistent with =, for an external orderedcollection implementing Iterable.Seehttp://clojure.org/data_structures#hash for full algorithms.
Added in Clojure version 1.6
Source


hash-set

function
Usage: (hash-set)       (hash-set & keys)
Returns a new hash set with supplied keys.  Any equal keys arehandled as if by repeated uses of conj.
Added in Clojure version 1.0
Source


hash-unordered-coll

function
Usage: (hash-unordered-coll coll)
Returns the hash code, consistent with =, for an external unorderedcollection implementing Iterable. For maps, the iterator shouldreturn map entries whose hash is computed as  (hash-ordered-coll [k v]).Seehttp://clojure.org/data_structures#hash for full algorithms.
Added in Clojure version 1.6
Source


ident?

function
Usage: (ident? x)
Return true if x is a symbol or keyword
Added in Clojure version 1.9
Source


identical?

function
Usage: (identical? x y)
Tests if 2 arguments are the same object
Added in Clojure version 1.0
Source


identity

function
Usage: (identity x)
Returns its argument.
Added in Clojure version 1.0
Source


if

special form
Usage: (if test then else?)
Evaluates test. If not the singular values nil or false,evaluates and yields then, otherwise, evaluates and yields else. Ifelse is not supplied it defaults to nil.Please seehttps://clojure.org/reference/special_forms#if
Added in Clojure version 1.0


if-let

macro
Usage: (if-let bindings then)       (if-let bindings then else & oldform)
bindings => binding-form testIf test is true, evaluates then with binding-form bound to the value of test, if not, yields else
Specs:  Args: (fspec          :args          (cat           :bindings (and vector? :clojure.core.specs.alpha/binding)           :then any?           :else (? any?))          :ret          any?          :fn          nil)  Ret:  (fspec          :args          (cat           :bindings (and vector? :clojure.core.specs.alpha/binding)           :then any?           :else (? any?))          :ret          any?          :fn          nil)
Added in Clojure version 1.0
Source


if-not

macro
Usage: (if-not test then)       (if-not test then else)
Evaluates test. If logical false, evaluates and returns then expr, otherwise else expr, if supplied, else nil.
Added in Clojure version 1.0
Source


if-some

macro
Usage: (if-some bindings then)       (if-some bindings then else & oldform)
bindings => binding-form testIf test is not nil, evaluates then with binding-form bound to thevalue of test, if not, yields else
Added in Clojure version 1.6
Source


ifn?

function
Usage: (ifn? x)
Returns true if x implements IFn. Note that many data structures(e.g. sets and maps) implement IFn
Added in Clojure version 1.0
Source


import

macro
Usage: (import & import-symbols-or-lists)
import-list => (package-symbol class-name-symbols*)For each name in class-name-symbols, adds a mapping from name to theclass named by package.name to the current namespace. Use :import in the nsmacro in preference to calling this directly.
Specs:  Args: (fspec          :args          :clojure.core.specs.alpha/quotable-import-list          :ret          any?          :fn          nil)  Ret:  (fspec          :args          :clojure.core.specs.alpha/quotable-import-list          :ret          any?          :fn          nil)
Added in Clojure version 1.0
Source


in-ns

function
Usage: (in-ns name)
Sets *ns* to the namespace named by the symbol, creating it if needed.
Added in Clojure version 1.0


inc

function
Usage: (inc x)
Returns a number one greater than num. Does not auto-promotelongs, will throw on overflow. See also: inc'
Added in Clojure version 1.2
Source


inc'

function
Usage: (inc' x)
Returns a number one greater than num. Supports arbitrary precision.See also: inc
Added in Clojure version 1.0
Source


indexed?

function
Usage: (indexed? coll)
Return true if coll implements Indexed, indicating efficient lookup by index
Added in Clojure version 1.9
Source


infinite?

function
Usage: (infinite? num)
Returns true if num is negative or positive infinity, else false
Added in Clojure version 1.11
Source


init-proxy

function
Usage: (init-proxy proxy mappings)
Takes a proxy instance and a map of strings (which mustcorrespond to methods of the proxy superclass/superinterfaces) tofns (which must take arguments matching the corresponding method,plus an additional (explicit) first arg corresponding to this, andsets the proxy's fn map.  Returns the proxy.
Added in Clojure version 1.0
Source


inst-ms

function
Usage: (inst-ms inst)
Return the number of milliseconds since January 1, 1970, 00:00:00 GMT
Added in Clojure version 1.9
Source


inst?

function
Usage: (inst? x)
Return true if x satisfies Inst
Added in Clojure version 1.9
Source


instance?

function
Usage: (instance? c x)
Evaluates x and tests if it is an instance of the classc. Returns true or false
Added in Clojure version 1.0
Source


int

function
Usage: (int x)
Coerce to int
Added in Clojure version 1.0
Source


int-array

function
Usage: (int-array size-or-seq)       (int-array size init-val-or-seq)
Creates an array of ints
Added in Clojure version 1.0
Source


int?

function
Usage: (int? x)
Return true if x is a fixed precision integer
Added in Clojure version 1.9
Source


integer?

function
Usage: (integer? n)
Returns true if n is an integer
Added in Clojure version 1.0
Source


interleave

function
Usage: (interleave)       (interleave c1)       (interleave c1 c2)       (interleave c1 c2 & colls)
Returns a lazy seq of the first item in each coll, then the second etc.
Added in Clojure version 1.0
Source


intern

function
Usage: (intern ns name)       (intern ns name val)
Finds or creates a var named by the symbol name in the namespacens (which can be a symbol or a namespace), setting its root bindingto val if supplied. The namespace must exist. The var will adopt anymetadata from the name symbol.  Returns the var.
Added in Clojure version 1.0
Source


interpose

function
Usage: (interpose sep)       (interpose sep coll)
Returns a lazy seq of the elements of coll separated by sep.Returns a stateful transducer when no collection is provided.
Added in Clojure version 1.0
Source


into

function
Usage: (into)       (into to)       (into to from)       (into to xform from)
Returns a new coll consisting of to with all of the items offrom conjoined. A transducer may be supplied.(into x) returns x. (into) returns [].
Added in Clojure version 1.0
Source


into-array

function
Usage: (into-array aseq)       (into-array type aseq)
Returns an array with components set to the values in aseq. The array'scomponent type is type if provided, or the type of the first value inaseq if present, or Object. All values in aseq must be compatible withthe component type. Class objects for the primitive types can be obtainedusing, e.g., Integer/TYPE.
Added in Clojure version 1.0
Source


ints

function
Usage: (ints xs)
Casts to int[]
Added in Clojure version 1.0
Source


io!

macro
Usage: (io! & body)
If an io! block occurs in a transaction, throws anIllegalStateException, else runs body in an implicit do. If thefirst expression in body is a literal string, will use that as theexception message.
Added in Clojure version 1.0
Source


isa?

function
Usage: (isa? child parent)       (isa? h child parent)
Returns true if (= child parent), or child is directly or indirectly derived fromparent, either via a Java type inheritance relationship or arelationship established via derive. h must be a hierarchy obtainedfrom make-hierarchy, if not supplied defaults to the globalhierarchy
Added in Clojure version 1.0
Source


iterate

function
Usage: (iterate f x)
Returns a lazy (infinite!) sequence of x, (f x), (f (f x)) etc.f must be free of side-effects
Added in Clojure version 1.0
Source


iteration

function
Usage: (iteration step & {:keys [somef vf kf initk], :or {vf identity, kf identity, somef some?, initk nil}})
Creates a seqable/reducible via repeated calls to step,a function of some (continuation token) 'k'. The first call to stepwill be passed initk, returning 'ret'. Iff (somef ret) is true,(vf ret) will be included in the iteration, else iteration willterminate and vf/kf will not be called. If (kf ret) is non-nil itwill be passed to the next step call, else iteration will terminate.This can be used e.g. to consume APIs that return paginated or batched data. step - (possibly impure) fn of 'k' -> 'ret' :somef - fn of 'ret' -> logical true/false, default 'some?' :vf - fn of 'ret' -> 'v', a value produced by the iteration, default 'identity' :kf - fn of 'ret' -> 'next-k' or nil (signaling 'do not continue'), default 'identity' :initk - the first value passed to step, default 'nil'It is presumed that step with non-initk is unreproducible/non-idempotent.If step with initk is unreproducible it is on the consumer to not consume twice.
Added in Clojure version 1.11
Source


iterator-seq

function
Usage: (iterator-seq iter)
Returns a seq on a java.util.Iterator. Note that most collectionsproviding iterators implement Iterable and thus support seq directly.Seqs cache values, thus iterator-seq should not be used on anyiterator that repeatedly returns the same mutable object.
Added in Clojure version 1.0
Source


juxt

function
Usage: (juxt f)       (juxt f g)       (juxt f g h)       (juxt f g h & fs)
Takes a set of functions and returns a fn that is the juxtapositionof those fns.  The returned fn takes a variable number of args, andreturns a vector containing the result of applying each fn to theargs (left-to-right).((juxt a b c) x) => [(a x) (b x) (c x)]
Added in Clojure version 1.1
Source


keep

function
Usage: (keep f)       (keep f coll)
Returns a lazy sequence of the non-nil results of (f item). Note,this means false return values will be included.  f must be free ofside-effects.  Returns a transducer when no collection is provided.
Added in Clojure version 1.2
Source


keep-indexed

function
Usage: (keep-indexed f)       (keep-indexed f coll)
Returns a lazy sequence of the non-nil results of (f index item). Note,this means false return values will be included.  f must be free ofside-effects.  Returns a stateful transducer when no collection isprovided.
Added in Clojure version 1.2
Source


key

function
Usage: (key e)
Returns the key of the map entry.
Added in Clojure version 1.0
Source


keys

function
Usage: (keys map)
Returns a sequence of the map's keys, in the same order as (seq map).
Added in Clojure version 1.0
Source


keyword

function
Usage: (keyword name)       (keyword ns name)
Returns a Keyword with the given namespace and name.  Do not use :in the keyword strings, it will be added automatically.
Added in Clojure version 1.0
Source


keyword?

function
Usage: (keyword? x)
Return true if x is a Keyword
Added in Clojure version 1.0
Source


last

function
Usage: (last coll)
Return the last item in coll, in linear time
Added in Clojure version 1.0
Source


lazy-cat

macro
Usage: (lazy-cat & colls)
Expands to code which yields a lazy sequence of the concatenationof the supplied colls.  Each coll expr is not evaluated until it isneeded. (lazy-cat xs ys zs) === (concat (lazy-seq xs) (lazy-seq ys) (lazy-seq zs))
Added in Clojure version 1.0
Source


lazy-seq

macro
Usage: (lazy-seq & body)
Takes a body of expressions that returns an ISeq or nil, and yieldsa Seqable object that will invoke the body only the first time seqis called, and will cache the result and return it on all subsequentseq calls. See also - realized?
Added in Clojure version 1.0
Source


let

special form
Usage: (let [bindings*] exprs*)
binding => binding-form init-exprbinding-form => name, or destructuring-formdestructuring-form => map-destructure-form, or seq-destructure-formEvaluates the exprs in a lexical context in which the symbols inthe binding-forms are bound to their respective init-exprs or partstherein.Seehttps://clojure.org/reference/special_forms#binding-forms formore information about destructuring.
Specs:  Args: (fspec          :args          (cat           :bindings :clojure.core.specs.alpha/bindings           :body (* any?))          :ret          any?          :fn          nil)  Ret:  (fspec          :args          (cat           :bindings :clojure.core.specs.alpha/bindings           :body (* any?))          :ret          any?          :fn          nil)
Added in Clojure version 1.0
Source


letfn

special form
Usage: (letfn [fnspecs*] exprs*)
fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+)Takes a vector of function specs and a body, and generates a set ofbindings of functions to their names. All of the names are availablein all of the definitions of the functions, as well as the body.
Added in Clojure version 1.0
Source


line-seq

function
Usage: (line-seq rdr)
Returns the lines of text from rdr as a lazy sequence of strings.rdr must implement java.io.BufferedReader.
Added in Clojure version 1.0
Source


list

function
Usage: (list & items)
Creates a new list containing the items.
Added in Clojure version 1.0
Source


list*

function
Usage: (list* args)       (list* a args)       (list* a b args)       (list* a b c args)       (list* a b c d & more)
Creates a new seq containing the items prepended to the rest, thelast of which will be treated as a sequence.
Added in Clojure version 1.0
Source


list?

function
Usage: (list? x)
Returns true if x implements IPersistentList
Added in Clojure version 1.0
Source


load

function
Usage: (load & paths)
Loads Clojure code from resources in classpath. A path is interpreted asclasspath-relative if it begins with a slash or relative to the rootdirectory for the current namespace otherwise.
Added in Clojure version 1.0
Source


load-file

function
Usage: (load-file name)
Sequentially read and evaluate the set of forms contained in the file.
Added in Clojure version 1.0


load-reader

function
Usage: (load-reader rdr)
Sequentially read and evaluate the set of forms contained in thestream/file
Added in Clojure version 1.0
Source


load-string

function
Usage: (load-string s)
Sequentially read and evaluate the set of forms contained in thestring
Added in Clojure version 1.0
Source


loaded-libs

function
Usage: (loaded-libs)
Returns a sorted set of symbols naming the currently loaded libs
Added in Clojure version 1.0
Source


locking

macro
Usage: (locking x & body)
Executes exprs in an implicit do, while holding the monitor of x.Will release the monitor of x in all circumstances.
Added in Clojure version 1.0
Source


long

function
Usage: (long x)
Coerce to long
Added in Clojure version 1.0
Source


long-array

function
Usage: (long-array size-or-seq)       (long-array size init-val-or-seq)
Creates an array of longs
Added in Clojure version 1.0
Source


longs

function
Usage: (longs xs)
Casts to long[]
Added in Clojure version 1.0
Source


loop

special form
Usage: (loop [bindings*] exprs*)
Evaluates the exprs in a lexical context in which the symbols inthe binding-forms are bound to their respective init-exprs or partstherein. Acts as a recur target.
Added in Clojure version 1.0
Source


macroexpand

function
Usage: (macroexpand form)
Repeatedly calls macroexpand-1 on form until it no longerrepresents a macro form, then returns it.  Note neithermacroexpand-1 nor macroexpand expand macros in subforms.
Added in Clojure version 1.0
Source


macroexpand-1

function
Usage: (macroexpand-1 form)
If form represents a macro form, returns its expansion,else returns form.
Added in Clojure version 1.0
Source


make-array

function
Usage: (make-array type len)       (make-array type dim & more-dims)
Creates and returns an array of instances of the specified class ofthe specified dimension(s).  Note that a class object is required.Class objects can be obtained by using their imported orfully-qualified name.  Class objects for the primitive types can beobtained using, e.g., Integer/TYPE.
Added in Clojure version 1.0
Source


make-hierarchy

function
Usage: (make-hierarchy)
Creates a hierarchy object for use with derive, isa? etc.
Added in Clojure version 1.0
Source


map

function
Usage: (map f)       (map f coll)       (map f c1 c2)       (map f c1 c2 c3)       (map f c1 c2 c3 & colls)
Returns a lazy sequence consisting of the result of applying f tothe set of first items of each coll, followed by applying f to theset of second items in each coll, until any one of the colls isexhausted.  Any remaining items in other colls are ignored. Functionf should accept number-of-colls arguments. Returns a transducer whenno collection is provided.
Added in Clojure version 1.0
Source


map-entry?

function
Usage: (map-entry? x)
Return true if x is a map entry
Added in Clojure version 1.8
Source


map-indexed

function
Usage: (map-indexed f)       (map-indexed f coll)
Returns a lazy sequence consisting of the result of applying f to 0and the first item of coll, followed by applying f to 1 and the seconditem in coll, etc, until coll is exhausted. Thus function f shouldaccept 2 arguments, index and item. Returns a stateful transducer whenno collection is provided.
Added in Clojure version 1.2
Source


map?

function
Usage: (map? x)
Return true if x implements IPersistentMap
Added in Clojure version 1.0
Source


mapcat

function
Usage: (mapcat f)       (mapcat f & colls)
Returns the result of applying concat to the result of applying mapto f and colls.  Thus function f should return a collection. Returnsa transducer when no collections are provided
Added in Clojure version 1.0
Source


mapv

function
Usage: (mapv f coll)       (mapv f c1 c2)       (mapv f c1 c2 c3)       (mapv f c1 c2 c3 & colls)
Returns a vector consisting of the result of applying f to theset of first items of each coll, followed by applying f to the setof second items in each coll, until any one of the colls isexhausted.  Any remaining items in other colls are ignored. Functionf should accept number-of-colls arguments.
Added in Clojure version 1.4
Source


max

function
Usage: (max x)       (max x y)       (max x y & more)
Returns the greatest of the nums.
Added in Clojure version 1.0
Source


max-key

function
Usage: (max-key k x)       (max-key k x y)       (max-key k 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.
Added in Clojure version 1.0
Source


memfn

macro
Usage: (memfn name & args)
Expands into code that creates a fn that expects to be passed anobject and any args and calls the named instance method on theobject passing the args. Use when you want to treat a Java method asa first-class fn. name may be type-hinted with the method receiver'stype in order to avoid reflective calls.
Added in Clojure version 1.0
Source


memoize

function
Usage: (memoize f)
Returns a memoized version of a referentially transparent function. Thememoized version of the function keeps a cache of the mapping from argumentsto results and, when calls with the same arguments are repeated often, hashigher performance at the expense of higher memory use.
Added in Clojure version 1.0
Source


merge

function
Usage: (merge & maps)
Returns a map that consists of the rest of the maps conj-ed ontothe first.  If a key occurs in more than one map, the mapping fromthe latter (left-to-right) will be the mapping in the result.
Added in Clojure version 1.0
Source


merge-with

function
Usage: (merge-with f & maps)
Returns a map that consists of the rest of the maps conj-ed ontothe first.  If a key occurs in more than one map, the mapping(s)from the latter (left-to-right) will be combined with the mapping inthe result by calling (f val-in-result val-in-latter).
Added in Clojure version 1.0
Source


meta

function
Usage: (meta obj)
Returns the metadata of obj, returns nil if there is no metadata.
Added in Clojure version 1.0
Source


methods

function
Usage: (methods multifn)
Given a multimethod, returns a map of dispatch values -> dispatch fns
Added in Clojure version 1.0
Source


min

function
Usage: (min x)       (min x y)       (min x y & more)
Returns the least of the nums.
Added in Clojure version 1.0
Source


min-key

function
Usage: (min-key k x)       (min-key k x y)       (min-key k 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.
Added in Clojure version 1.0
Source


mix-collection-hash

function
Usage: (mix-collection-hash hash-basis count)
Mix final collection hash for ordered or unordered collections.hash-basis is the combined collection hash, count is the numberof elements included in the basis. Note this is the hash codeconsistent with =, different from .hashCode.Seehttp://clojure.org/data_structures#hash for full algorithms.
Added in Clojure version 1.6
Source


mod

function
Usage: (mod num div)
Modulus of num and div. Truncates toward negative infinity.
Added in Clojure version 1.0
Source


monitor-enter

special form
Usage: (monitor-enter x)
Synchronization primitive that should be avoidedin user code. Use the 'locking' macro.Please seehttps://clojure.org/reference/special_forms#monitor-enter
Added in Clojure version 1.0


monitor-exit

special form
Usage: (monitor-exit x)
Synchronization primitive that should be avoidedin user code. Use the 'locking' macro.Please seehttps://clojure.org/reference/special_forms#monitor-exit
Added in Clojure version 1.0


name

function
Usage: (name x)
Returns the name String of a string, symbol or keyword.
Added in Clojure version 1.0
Source


namespace

function
Usage: (namespace x)
Returns the namespace String of a symbol or keyword, or nil if not present.
Added in Clojure version 1.0
Source


namespace-munge

function
Usage: (namespace-munge ns)
Convert a Clojure namespace name to a legal Java package name.
Added in Clojure version 1.2
Source


nat-int?

function
Usage: (nat-int? x)
Return true if x is a non-negative fixed precision integer
Added in Clojure version 1.9
Source


neg-int?

function
Usage: (neg-int? x)
Return true if x is a negative fixed precision integer
Added in Clojure version 1.9
Source


neg?

function
Usage: (neg? num)
Returns true if num is less than zero, else false
Added in Clojure version 1.0
Source


new

special form
Usage: (Classname. args*)       (new Classname args*)
The args, if any, are evaluated from left to right, andpassed to the constructor of the class named by Classname. Theconstructed object is returned.Please seehttps://clojure.org/java_interop#new
Added in Clojure version 1.0


newline

function
Usage: (newline)
Writes a platform-specific newline to *out*
Added in Clojure version 1.0
Source


next

function
Usage: (next coll)
Returns a seq of the items after the first. Calls seq on itsargument.  If there are no more items, returns nil.
Added in Clojure version 1.0
Source


nfirst

function
Usage: (nfirst x)
Same as (next (first x))
Added in Clojure version 1.0
Source


nil?

function
Usage: (nil? x)
Returns true if x is nil, false otherwise.
Added in Clojure version 1.0
Source


nnext

function
Usage: (nnext x)
Same as (next (next x))
Added in Clojure version 1.0
Source


not

function
Usage: (not x)
Returns true if x is logical false, false otherwise.
Added in Clojure version 1.0
Source


not-any?

function
Usage: (not-any? pred coll)
Returns false if (pred x) is logical true for any x in coll,else true.
Added in Clojure version 1.0
Source


not-empty

function
Usage: (not-empty coll)
If coll is empty, returns nil, else coll
Added in Clojure version 1.0
Source


not-every?

function
Usage: (not-every? pred coll)
Returns false if (pred x) is logical true for every x incoll, else true.
Added in Clojure version 1.0
Source


not=

function
Usage: (not= x)       (not= x y)       (not= x y & more)
Same as (not (= obj1 obj2))
Added in Clojure version 1.0
Source


ns

macro
Usage: (ns name docstring? attr-map? references*)
Sets *ns* to the namespace named by name (unevaluated), creating itif needed.  references can be zero or more of: (:refer-clojure ...)(:require ...) (:use ...) (:import ...) (:load ...) (:gen-class)with the syntax of refer-clojure/require/use/import/load/gen-classrespectively, except the arguments are unevaluated and need not bequoted. (:gen-class ...), when supplied, defaults to :namecorresponding to the ns name, :main true, :impl-ns same as ns, and:init-impl-ns true. All options of gen-class aresupported. The :gen-class directive is ignored when notcompiling. If :gen-class is not supplied, when compiled only annsname__init.class will be generated. If :refer-clojure is not used, adefault (refer 'clojure.core) is used.  Use of ns is preferred toindividual calls to in-ns/require/use/import:(ns foo.bar  (:refer-clojure :exclude [ancestors printf])  (:require (clojure.contrib sql combinatorics))  (:use (my.lib this that))  (:import (java.util Date Timer Random)           (java.sql Connection Statement)))
Specs:  Args: (fspec          :args          :clojure.core.specs.alpha/ns-form          :ret          any?          :fn          nil)  Ret:  (fspec          :args          :clojure.core.specs.alpha/ns-form          :ret          any?          :fn          nil)
Added in Clojure version 1.0
Source


ns-aliases

function
Usage: (ns-aliases ns)
Returns a map of the aliases for the namespace.
Added in Clojure version 1.0
Source


ns-imports

function
Usage: (ns-imports ns)
Returns a map of the import mappings for the namespace.
Added in Clojure version 1.0
Source


ns-interns

function
Usage: (ns-interns ns)
Returns a map of the intern mappings for the namespace.
Added in Clojure version 1.0
Source


ns-map

function
Usage: (ns-map ns)
Returns a map of all the mappings for the namespace.
Added in Clojure version 1.0
Source


ns-name

function
Usage: (ns-name ns)
Returns the name of the namespace, a symbol.
Added in Clojure version 1.0
Source


ns-publics

function
Usage: (ns-publics ns)
Returns a map of the public intern mappings for the namespace.
Added in Clojure version 1.0
Source


ns-refers

function
Usage: (ns-refers ns)
Returns a map of the refer mappings for the namespace.
Added in Clojure version 1.0
Source


ns-resolve

function
Usage: (ns-resolve ns sym)       (ns-resolve ns env sym)
Returns the var or Class to which a symbol will be resolved in thenamespace (unless found in the environment), else nil.  Note thatif the symbol is fully qualified, the var/Class to which it resolvesneed not be present in the namespace.
Added in Clojure version 1.0
Source


ns-unalias

function
Usage: (ns-unalias ns sym)
Removes the alias for the symbol from the namespace.
Added in Clojure version 1.0
Source


ns-unmap

function
Usage: (ns-unmap ns sym)
Removes the mappings for the symbol from the namespace.
Added in Clojure version 1.0
Source


nth

function
Usage: (nth coll index)       (nth coll index not-found)
Returns the value at the index. get returns nil if index out ofbounds, nth throws an exception unless not-found is supplied.  nthalso works for strings, Java arrays, regex Matchers and Lists, and,in O(n) time, for sequences.
Added in Clojure version 1.0
Source


nthnext

function
Usage: (nthnext coll n)
Returns the nth next of coll, (seq coll) when n is 0.
Added in Clojure version 1.0
Source


nthrest

function
Usage: (nthrest coll n)
Returns the nth rest of coll, coll when n is 0.
Added in Clojure version 1.3
Source


num

function
Usage: (num x)
Coerce to Number
Added in Clojure version 1.0
Source


number?

function
Usage: (number? x)
Returns true if x is a Number
Added in Clojure version 1.0
Source


numerator

function
Usage: (numerator r)
Returns the numerator part of a Ratio.
Added in Clojure version 1.2
Source


object-array

function
Usage: (object-array size-or-seq)
Creates an array of objects
Added in Clojure version 1.2
Source


odd?

function
Usage: (odd? n)
Returns true if n is odd, throws an exception if n is not an integer
Added in Clojure version 1.0
Source


or

macro
Usage: (or)       (or x)       (or x & next)
Evaluates exprs one at a time, from left to right. If a formreturns a logical true value, or returns that value and doesn'tevaluate any of the other expressions, otherwise it returns thevalue of the last expression. (or) returns nil.
Added in Clojure version 1.0
Source


parents

function
Usage: (parents tag)       (parents h tag)
Returns the immediate parents of tag, either via a Java typeinheritance relationship or a relationship established via derive. hmust be a hierarchy obtained from make-hierarchy, if not supplieddefaults to the global hierarchy
Added in Clojure version 1.0
Source


parse-boolean

function
Usage: (parse-boolean s)
Parse strings "true" or "false" and return a boolean, or nil if invalid
Added in Clojure version 1.11
Source


parse-double

function
Usage: (parse-double s)
Parse string with floating point components and return a Double value,or nil if parse fails.Grammar:https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html#valueOf-java.lang.String-
Added in Clojure version 1.11
Source


parse-long

function
Usage: (parse-long s)
Parse string of decimal digits with optional leading -/+ and return aLong value, or nil if parse fails
Added in Clojure version 1.11
Source


parse-uuid

function
Usage: (parse-uuid s)
Parse a string representing a UUID and return a java.util.UUID instance,or nil if parse fails.Grammar:https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html#toString--
Added in Clojure version 1.11
Source


partial

function
Usage: (partial f)       (partial f arg1)       (partial f arg1 arg2)       (partial f arg1 arg2 arg3)       (partial f arg1 arg2 arg3 & more)
Takes a function f and fewer than the normal arguments to f, andreturns a fn that takes a variable number of additional args. Whencalled, the returned function calls f with args + additional args.
Added in Clojure version 1.0
Source


partition

function
Usage: (partition n coll)       (partition n step coll)       (partition n step pad coll)
Returns a lazy sequence of lists of n items each, at offsets stepapart. If step is not supplied, defaults to n, i.e. the partitionsdo not overlap. If a pad collection is supplied, use its elements asnecessary to complete last partition upto n items. In case there arenot enough padding elements, return a partition with less than n items.
Added in Clojure version 1.0
Source


partition-all

function
Usage: (partition-all n)       (partition-all n coll)       (partition-all n step coll)
Returns a lazy sequence of lists like partition, but may includepartitions with fewer than n items at the end.  Returns a statefultransducer when no collection is provided.
Added in Clojure version 1.2
Source


partition-by

function
Usage: (partition-by f)       (partition-by f coll)
Applies f to each value in coll, splitting it each time f returns anew value.  Returns a lazy seq of partitions.  Returns a statefultransducer when no collection is provided.
Added in Clojure version 1.2
Source


partitionv

function
Usage: (partitionv n coll)       (partitionv n step coll)       (partitionv n step pad coll)
Returns a lazy sequence of vectors of n items each, at offsets stepapart. If step is not supplied, defaults to n, i.e. the partitionsdo not overlap. If a pad collection is supplied, use its elements asnecessary to complete last partition upto n items. In case there arenot enough padding elements, return a partition with less than n items.
Added in Clojure version 1.12
Source


partitionv-all

function
Usage: (partitionv-all n)       (partitionv-all n coll)       (partitionv-all n step coll)
Returns a lazy sequence of vector partitions, but may includepartitions with fewer than n items at the end.Returns a stateful transducer when no collection is provided.
Added in Clojure version 1.12
Source


pcalls

function
Usage: (pcalls & fns)
Executes the no-arg fns in parallel, returning a lazy sequence oftheir values
Added in Clojure version 1.0
Source


peek

function
Usage: (peek coll)
For a list or queue, same as first, for a vector, same as, but muchmore efficient than, last. If the collection is empty, returns nil.
Added in Clojure version 1.0
Source


persistent!

function
Usage: (persistent! coll)
Returns a new, persistent version of the transient collection, inconstant time. The transient collection cannot be used after thiscall, any such use will throw an exception.
Added in Clojure version 1.1
Source


pmap

function
Usage: (pmap f coll)       (pmap f coll & colls)
Like map, except f is applied in parallel. Semi-lazy in that theparallel computation stays ahead of the consumption, but doesn'trealize the entire result unless required. Only useful forcomputationally intensive functions where the time of f dominatesthe coordination overhead.
Added in Clojure version 1.0
Source


pop

function
Usage: (pop coll)
For a list or queue, returns a new list/queue without the firstitem, for a vector, returns a new vector without the last item. Ifthe collection is empty, throws an exception.  Note - not the sameas next/butlast.
Added in Clojure version 1.0
Source


pop!

function
Usage: (pop! coll)
Removes the last item from a transient vector. Ifthe collection is empty, throws an exception. Returns coll
Added in Clojure version 1.1
Source


pop-thread-bindings

function
Usage: (pop-thread-bindings)
Pop one set of bindings pushed with push-binding before. It is an error topop bindings without pushing before.
Added in Clojure version 1.1
Source


pos-int?

function
Usage: (pos-int? x)
Return true if x is a positive fixed precision integer
Added in Clojure version 1.9
Source


pos?

function
Usage: (pos? num)
Returns true if num is greater than zero, else false
Added in Clojure version 1.0
Source


pr

dynamic function
Usage: (pr)       (pr x)       (pr x & more)
Prints the object(s) to the output stream that is the current valueof *out*.  Prints the object(s), separated by spaces if there ismore than one.  By default, pr and prn print in a way that objectscan be read by the reader
Added in Clojure version 1.0
Source


pr-str

function
Usage: (pr-str & xs)
pr to a string, returning it
Added in Clojure version 1.0
Source


prefer-method

function
Usage: (prefer-method multifn dispatch-val-x dispatch-val-y)
Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y when there is a conflict
Added in Clojure version 1.0
Source


prefers

function
Usage: (prefers multifn)
Given a multimethod, returns a map of preferred value -> set of other values
Added in Clojure version 1.0
Source


print

function
Usage: (print & more)
Prints the object(s) to the output stream that is the current valueof *out*.  print and println produce output for human consumption.
Added in Clojure version 1.0
Source


print-str

function
Usage: (print-str & xs)
print to a string, returning it
Added in Clojure version 1.0
Source


printf

function
Usage: (printf fmt & args)
Prints formatted output, as per format
Added in Clojure version 1.0
Source


println

function
Usage: (println & more)
Same as print followed by (newline)
Added in Clojure version 1.0
Source


println-str

function
Usage: (println-str & xs)
println to a string, returning it
Added in Clojure version 1.0
Source


prn

function
Usage: (prn & more)
Same as pr followed by (newline). Observes *flush-on-newline*
Added in Clojure version 1.0
Source


prn-str

function
Usage: (prn-str & xs)
prn to a string, returning it
Added in Clojure version 1.0
Source


promise

function
Usage: (promise)
Returns a promise object that can be read with deref/@, and set,once only, with deliver. Calls to deref/@ prior to delivery willblock, unless the variant of deref with timeout is used. Allsubsequent derefs will return the same delivered value withoutblocking. See also - realized?.
Added in Clojure version 1.1
Source


proxy

macro
Usage: (proxy class-and-interfaces args & fs)
class-and-interfaces - a vector of class namesargs - a (possibly empty) vector of arguments to the superclassconstructor.f => (name [params*] body) or(name ([params*] body) ([params+] body) ...)Expands to code which creates a instance of a proxy class thatimplements the named class/interface(s) by calling the suppliedfns. A single class, if provided, must be first. If not provided itdefaults to Object.The interfaces names must be valid interface types. If a method fnis not provided for a class method, the superclass method will becalled. If a method fn is not provided for an interface method, anUnsupportedOperationException will be thrown should it becalled. Method fns are closures and can capture the environment inwhich proxy is called. Each method fn takes an additional implicitfirst arg, which is bound to 'this. Note that while method fns canbe provided to override protected methods, they have no other accessto protected members, nor to super, as these capabilities cannot beproxied.
Added in Clojure version 1.0
Source


proxy-mappings

function
Usage: (proxy-mappings proxy)
Takes a proxy instance and returns the proxy's fn map.
Added in Clojure version 1.0
Source


proxy-super

macro
Usage: (proxy-super meth & args)
Use to call a superclass method in the body of a proxy method. Note, expansion captures 'this
Added in Clojure version 1.0
Source


push-thread-bindings

function
Usage: (push-thread-bindings bindings)
WARNING: This is a low-level function. Prefer high-level macros likebinding where ever possible.Takes a map of Var/value pairs. Binds each Var to the associated value forthe current thread. Each call *MUST* be accompanied by a matching call topop-thread-bindings wrapped in a try-finally!    (push-thread-bindings bindings)    (try      ...      (finally        (pop-thread-bindings)))
Added in Clojure version 1.1
Source


pvalues

macro
Usage: (pvalues & exprs)
Returns a lazy sequence of the values of the exprs, which areevaluated in parallel
Added in Clojure version 1.0
Source


qualified-ident?

function
Usage: (qualified-ident? x)
Return true if x is a symbol or keyword with a namespace
Added in Clojure version 1.9
Source


qualified-keyword?

function
Usage: (qualified-keyword? x)
Return true if x is a keyword with a namespace
Added in Clojure version 1.9
Source


qualified-symbol?

function
Usage: (qualified-symbol? x)
Return true if x is a symbol with a namespace
Added in Clojure version 1.9
Source


quot

function
Usage: (quot num div)
quot[ient] of dividing numerator by denominator.
Added in Clojure version 1.0
Source


quote

special form
Usage: (quote form)
Yields the unevaluated form.Please seehttps://clojure.org/reference/special_forms#quote
Added in Clojure version 1.0


rand

function
Usage: (rand)       (rand n)
Returns a random floating point number between 0 (inclusive) andn (default 1) (exclusive).
Added in Clojure version 1.0
Source


rand-int

function
Usage: (rand-int n)
Returns a random integer between 0 (inclusive) and n (exclusive).
Added in Clojure version 1.0
Source


rand-nth

function
Usage: (rand-nth coll)
Return a random element of the (sequential) collection. Will havethe same performance characteristics as nth for the givencollection.
Added in Clojure version 1.2
Source


random-sample

function
Usage: (random-sample prob)       (random-sample prob coll)
Returns items from coll with random probability of prob (0.0 -1.0).  Returns a transducer when no collection is provided.
Added in Clojure version 1.7
Source


random-uuid

function
Usage: (random-uuid)
Returns a pseudo-randomly generated java.util.UUID instance (i.e. type 4).See:https://docs.oracle.com/javase/8/docs/api/java/util/UUID.html#randomUUID--
Added in Clojure version 1.11
Source


range

function
Usage: (range)       (range end)       (range start end)       (range start end step)
Returns a lazy seq of nums from start (inclusive) to end(exclusive), by step, where start defaults to 0, step to 1, and end toinfinity. When step is equal to 0, returns an infinite sequence ofstart. When start is equal to end, returns empty list.
Added in Clojure version 1.0
Source


ratio?

function
Usage: (ratio? n)
Returns true if n is a Ratio
Added in Clojure version 1.0
Source


rational?

function
Usage: (rational? n)
Returns true if n is a rational number
Added in Clojure version 1.0
Source


rationalize

function
Usage: (rationalize num)
returns the rational value of num
Added in Clojure version 1.0
Source


re-find

function
Usage: (re-find m)       (re-find re s)
Returns the next regex match, if any, of string to pattern, usingjava.util.regex.Matcher.find().  Uses re-groups to return thegroups.
Added in Clojure version 1.0
Source


re-groups

function
Usage: (re-groups m)
Returns the groups from the most recent match/find. If there are nonested groups, returns a string of the entire match. If there arenested groups, returns a vector of the groups, the first elementbeing the entire match.
Added in Clojure version 1.0
Source


re-matcher

function
Usage: (re-matcher re s)
Returns an instance of java.util.regex.Matcher, for use, e.g. inre-find.
Added in Clojure version 1.0
Source


re-matches

function
Usage: (re-matches re s)
Returns the match, if any, of string to pattern, usingjava.util.regex.Matcher.matches().  Uses re-groups to return thegroups.
Added in Clojure version 1.0
Source


re-pattern

function
Usage: (re-pattern s)
Returns an instance of java.util.regex.Pattern, for use, e.g. inre-matcher.
Added in Clojure version 1.0
Source


re-seq

function
Usage: (re-seq re s)
Returns a lazy sequence of successive matches of pattern in string,using java.util.regex.Matcher.find(), each such match processed withre-groups.
Added in Clojure version 1.0
Source


read

function
Usage: (read)       (read stream)       (read stream eof-error? eof-value)       (read stream eof-error? eof-value recursive?)       (read opts stream)
Reads the next object from stream, which must be an instance ofjava.io.PushbackReader or some derivee.  stream defaults to thecurrent value of *in*.Opts is a persistent map with valid keys:  :read-cond - :allow to process reader conditionals, or               :preserve to keep all branches  :features - persistent set of feature keywords for reader conditionals  :eof - on eof, return value unless :eofthrow, then throw.         if not specified, will throwNote that read can execute code (controlled by *read-eval*),and as such should be used only with trusted sources.For data structure interop use clojure.edn/read
Added in Clojure version 1.0
Source


read+string

function
Usage: (read+string)       (read+string stream)       (read+string stream eof-error? eof-value)       (read+string stream eof-error? eof-value recursive?)       (read+string opts stream)
Like read, and taking the same args. stream must be a LineNumberingPushbackReader.Returns a vector containing the object read and the (whitespace-trimmed) string read.
Added in Clojure version 1.10
Source


read-line

function
Usage: (read-line)
Reads the next line from stream that is the current value of *in* .
Added in Clojure version 1.0
Source


read-string

function
Usage: (read-string s)       (read-string opts s)
Reads one object from the string s. Optionally include readeroptions, as specified in read.Note that read-string can execute code (controlled by *read-eval*),and as such should be used only with trusted sources.For data structure interop use clojure.edn/read-string
Added in Clojure version 1.0
Source


reader-conditional

function
Usage: (reader-conditional form splicing?)
Construct a data representation of a reader conditional.If true, splicing? indicates read-cond-splicing.
Added in Clojure version 1.7
Source


reader-conditional?

function
Usage: (reader-conditional? value)
Return true if the value is the data representation of a reader conditional
Added in Clojure version 1.7
Source


realized?

function
Usage: (realized? x)
Returns true if a value has been produced for a promise, delay, future or lazy sequence.
Added in Clojure version 1.3
Source


record?

function
Usage: (record? x)
Returns true if x is a record
Added in Clojure version 1.6
Source


recur

special form
Usage: (recur exprs*)
Evaluates the exprs in order, then, in parallel, rebindsthe bindings of the recursion point to the values of the exprs.Execution then jumps back to the recursion point, a loop or fn method.Please seehttps://clojure.org/reference/special_forms#recur
Added in Clojure version 1.0


reduce

function
Usage: (reduce f coll)       (reduce f val coll)
f should be a function of 2 arguments. If val is not supplied,returns the result of applying f to the first 2 items in coll, thenapplying f to that result and the 3rd item, etc. If coll contains noitems, f must accept no arguments as well, and reduce returns theresult of calling f with no arguments.  If coll has only 1 item, itis returned and f is not called.  If val is supplied, returns theresult of applying f to val and the first item in coll, thenapplying f to that result and the 2nd item, etc. If coll contains noitems, returns val and f is not called.
Added in Clojure version 1.0
Source


reduce-kv

function
Usage: (reduce-kv f init coll)
Reduces an associative collection. f should be a function of 3arguments. Returns the result of applying f to init, the first keyand the first value in coll, then applying f to that result and the2nd key and value, etc. If coll contains no entries, returns initand f is not called. Note that reduce-kv is supported on vectors,where the keys will be the ordinals.
Added in Clojure version 1.4
Source


reduced

function
Usage: (reduced x)
Wraps x in a way such that a reduce will terminate with the value x
Added in Clojure version 1.5
Source


reduced?

function
Usage: (reduced? x)
Returns true if x is the result of a call to reduced
Added in Clojure version 1.5
Source


reductions

function
Usage: (reductions f coll)       (reductions f init coll)
Returns a lazy seq of the intermediate values of the reduction (asper reduce) of coll by f, starting with init.
Added in Clojure version 1.2
Source


ref

function
Usage: (ref x)       (ref x & options)
Creates and returns a Ref with an initial value of x and zero ormore 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 theref. validate-fn must be nil or a side-effect-free fn of oneargument, which will be passed the intended new state on any statechange. If the new state is unacceptable, the validate-fn shouldreturn false or throw an exception. validate-fn will be called ontransaction commit, when all refs have their final values.Normally refs accumulate history dynamically as needed to deal withread demands. If you know in advance you will need history you canset :min-history to ensure it will be available when first needed (insteadof after a read fault). History is limited, and the limit can be setwith :max-history.
Added in Clojure version 1.0
Source


ref-history-count

function
Usage: (ref-history-count ref)
Returns the history count of a ref
Added in Clojure version 1.1
Source


ref-max-history

function
Usage: (ref-max-history ref)       (ref-max-history ref n)
Gets the max-history of a ref, or sets it and returns the ref
Added in Clojure version 1.1
Source


ref-min-history

function
Usage: (ref-min-history ref)       (ref-min-history ref n)
Gets the min-history of a ref, or sets it and returns the ref
Added in Clojure version 1.1
Source


ref-set

function
Usage: (ref-set ref val)
Must be called in a transaction. Sets the value of ref.Returns val.
Added in Clojure version 1.0
Source


refer

function
Usage: (refer ns-sym & filters)
refers to all public vars of ns, subject to filters.filters can include at most one each of::exclude list-of-symbols:only list-of-symbols:rename map-of-fromsymbol-tosymbolFor each public interned var in the namespace named by the symbol,adds a mapping from the name of the var to the var to the currentnamespace.  Throws an exception if name is already mapped tosomething else in the current namespace. Filters can be used toselect a subset, via inclusion or exclusion, or to provide a mappingto a symbol different from the var's name, in order to preventclashes. Use :use in the ns macro in preference to calling this directly.
Added in Clojure version 1.0
Source


refer-clojure

macro
Usage: (refer-clojure & filters)
Same as (refer 'clojure.core <filters>)
Specs:  Args: (fspec          :args          (*            (alt             :exclude (cat                       :op (quotable #{:exclude})                       :arg (quotable                              :clojure.core.specs.alpha/exclude))             :only (cat                    :op (quotable #{:only})                    :arg (quotable :clojure.core.specs.alpha/only))             :rename (cat                      :op (quotable #{:rename})                      :arg (quotable                             :clojure.core.specs.alpha/rename))))          :ret          any?          :fn          nil)  Ret:  (fspec          :args          (*            (alt             :exclude (cat                       :op (quotable #{:exclude})                       :arg (quotable                              :clojure.core.specs.alpha/exclude))             :only (cat                    :op (quotable #{:only})                    :arg (quotable :clojure.core.specs.alpha/only))             :rename (cat                      :op (quotable #{:rename})                      :arg (quotable                             :clojure.core.specs.alpha/rename))))          :ret          any?          :fn          nil)
Added in Clojure version 1.0
Source


reify

macro
Usage: (reify & opts+specs)
reify creates an object implementing a protocol or interface. reify is a macro with the following structure:(reify options* specs*)  Currently there are no options. Each spec consists of the protocol or interface name followed by zero or more method bodies: protocol-or-interface-or-Object (methodName [args+] body)* Methods should be supplied for all methods of the desired protocol(s) and interface(s). You can also define overrides for methods of Object. Note that the first parameter must be supplied to correspond to the target object ('this' in Java parlance). Thus methods for interfaces will take one more argument than do the interface declarations.  Note also that recur calls to the method head should *not* pass the target object, it will be supplied automatically and can not be substituted. The return type can be indicated by a type hint on the method name, and arg types can be indicated by a type hint on arg names. If you leave out all hints, reify will try to match on same name/arity method in the protocol(s)/interface(s) - this is preferred. If you supply any hints at all, no inference is done, so all hints (or default of Object) must be correct, for both arguments and return type. If a method is overloaded in a protocol/interface, multiple independent method definitions must be supplied.  If overloaded with same arity in an interface you must specify complete hints to disambiguate - a missing hint implies Object. Method heads are recursion points for recur, as in a fn. The method bodies of reify are lexical closures, and can refer to the surrounding local scope:  (str (let [f "foo"]         (reify Object          (toString [this] f)))) == "foo" (seq (let [f "foo"]         (reify clojure.lang.Seqable          (seq [this] (seq f))))) == (\f \o \o)  reify always implements clojure.lang.IObj and transfers meta data of the form to the created object.  (meta ^{:k :v} (reify Object (toString [this] "foo"))) == {:k :v}
Added in Clojure version 1.2
Source


release-pending-sends

function
Usage: (release-pending-sends)
Normally, actions sent directly or indirectly during another actionare held until the action completes (changes the agent'sstate). This function can be used to dispatch any pending sentactions immediately. This has no impact on actions sent during atransaction, which are still held until commit. If no action isoccurring, does nothing. Returns the number of actions dispatched.
Added in Clojure version 1.0
Source


rem

function
Usage: (rem num div)
remainder of dividing numerator by denominator.
Added in Clojure version 1.0
Source


remove

function
Usage: (remove pred)       (remove pred coll)
Returns a lazy sequence of the items in coll for which(pred item) returns logical false. pred must be free of side-effects.Returns a transducer when no collection is provided.
Added in Clojure version 1.0
Source


remove-all-methods

function
Usage: (remove-all-methods multifn)
Removes all of the methods of multimethod.
Added in Clojure version 1.2
Source


remove-method

function
Usage: (remove-method multifn dispatch-val)
Removes the method of multimethod associated with dispatch-value.
Added in Clojure version 1.0
Source


remove-ns

function
Usage: (remove-ns sym)
Removes the namespace named by the symbol. Use with caution.Cannot be used to remove the clojure namespace.
Added in Clojure version 1.0
Source


remove-tap

function
Usage: (remove-tap f)
Remove f from the tap set.
Added in Clojure version 1.10
Source


remove-watch

function
Usage: (remove-watch reference key)
Removes a watch (set by add-watch) from a reference
Added in Clojure version 1.0
Source


repeat

function
Usage: (repeat x)       (repeat n x)
Returns a lazy (infinite!, or length n if supplied) sequence of xs.
Added in Clojure version 1.0
Source


repeatedly

function
Usage: (repeatedly f)       (repeatedly n f)
Takes a function of no args, presumably with side effects, andreturns an infinite (or length n if supplied) lazy sequence of callsto it
Added in Clojure version 1.0
Source


replace

function
Usage: (replace smap)       (replace smap coll)
Given a map of replacement pairs and a vector/collection, returns avector/seq with any elements = a key in smap replaced with thecorresponding val in smap.  Returns a transducer when no collectionis provided.
Added in Clojure version 1.0
Source


replicate

function
Usage: (replicate n x)
DEPRECATED: Use 'repeat' instead.Returns a lazy seq of n xs.
Added in Clojure version 1.0
Deprecated since Clojure version 1.3
Source


require

function
Usage: (require & args)
Loads libs, skipping any that are already loaded. Each argument iseither a libspec that identifies a lib, a prefix list that identifiesmultiple libs whose names share a common prefix, or a flag that modifieshow all the identified libs are loaded. Use :require in the ns macroin preference to calling this directly.LibsA 'lib' is a named set of resources in classpath whose contents define alibrary of Clojure code. Lib names are symbols and each lib is associatedwith a Clojure namespace and a Java package that share its name. A lib'sname also locates its root directory within classpath using Java'spackage name to classpath-relative path mapping. All resources in a libshould be contained in the directory structure under its root directory.All definitions a lib makes should be in its associated namespace.'require loads a lib by loading its root resource. The root resource pathis derived from the lib name in the following manner:Consider a lib named by the symbol 'x.y.z; it has the root directory<classpath>/x/y/, and its root resource is <classpath>/x/y/z.clj, or<classpath>/x/y/z.cljc if <classpath>/x/y/z.clj does not exist. Theroot resource should contain code to create the lib'snamespace (usually by using the ns macro) and load any additionallib resources.LibspecsA libspec is a lib name or a vector containing a lib name followed byoptions expressed as sequential keywords and arguments.Recognized options::as takes a symbol as its argument and makes that symbol an alias to the  lib's namespace in the current namespace.:as-alias takes a symbol as its argument and aliases like :as, however  the lib will not be loaded. If the lib has not been loaded, a new  empty namespace will be created (as with create-ns).:refer takes a list of symbols to refer from the namespace or the :all  keyword to bring in all public vars.Prefix ListsIt's common for Clojure code to depend on several libs whose names havethe same prefix. When specifying libs, prefix lists can be used to reducerepetition. A prefix list contains the shared prefix followed by libspecswith the shared prefix removed from the lib names. After removing theprefix, the names that remain must not contain any periods.FlagsA flag is a keyword.Recognized flags: :reload, :reload-all, :verbose:reload forces loading of all the identified libs even if they are  already loaded (has no effect on libspecs using :as-alias):reload-all implies :reload and also forces loading of all libs that the  identified libs directly or indirectly load via require or use  (has no effect on libspecs using :as-alias):verbose triggers printing information about each load, alias, and referExample:The following would load the libraries clojure.zip and clojure.setabbreviated as 's'.(require '(clojure zip [set :as s]))
Added in Clojure version 1.0
Source


requiring-resolve

function
Usage: (requiring-resolve sym)
Resolves namespace-qualified sym per 'resolve'. If initial resolvefails, attempts to require sym's namespace and retries.
Added in Clojure version 1.10
Source


reset!

function
Usage: (reset! atom newval)
Sets the value of atom to newval without regard for thecurrent value. Returns newval.
Added in Clojure version 1.0
Source


reset-meta!

function
Usage: (reset-meta! iref metadata-map)
Atomically resets the metadata for a namespace/var/ref/agent/atom
Added in Clojure version 1.0
Source


reset-vals!

function
Usage: (reset-vals! atom newval)
Sets the value of atom to newval. Returns [old new], the value of theatom before and after the reset.
Added in Clojure version 1.9
Source


resolve

function
Usage: (resolve sym)       (resolve env sym)
same as (ns-resolve *ns* symbol) or (ns-resolve *ns* &env symbol)
Added in Clojure version 1.0
Source


rest

function
Usage: (rest coll)
Returns a possibly empty seq of the items after the first. Calls seq on itsargument.
Added in Clojure version 1.0
Source


restart-agent

function
Usage: (restart-agent a new-state & options)
When an agent is failed, changes the agent state to new-state andthen un-fails the agent so that sends are allowed again.  Ifa :clear-actions true option is given, any actions queued on theagent that were being held while it was failed will be discarded,otherwise those held actions will proceed.  The new-state must passthe validator if any, or restart will throw an exception and theagent will remain failed with its old state and error.  Watchers, ifany, will NOT be notified of the new state.  Throws an exception ifthe agent is not failed.
Added in Clojure version 1.2
Source


resultset-seq

function
Usage: (resultset-seq rs)
Creates and returns a lazy sequence of structmaps corresponding tothe rows in the java.sql.ResultSet rs
Added in Clojure version 1.0
Source


reverse

function
Usage: (reverse coll)
Returns a seq of the items in coll in reverse order. Not lazy.
Added in Clojure version 1.0
Source


reversible?

function
Usage: (reversible? coll)
Returns true if coll implements Reversible
Added in Clojure version 1.0
Source


rseq

function
Usage: (rseq rev)
Returns, in constant time, a seq of the items in rev (whichcan be a vector or sorted-map), in reverse order. If rev is empty returns nil
Added in Clojure version 1.0
Source


rsubseq

function
Usage: (rsubseq sc test key)       (rsubseq sc start-test start-key end-test end-key)
sc must be a sorted collection, test(s) one of <, <=, > or>=. Returns a reverse seq of those entries with keys ek forwhich (test (.. sc comparator (compare ek key)) 0) is true
Added in Clojure version 1.0
Source


run!

function
Usage: (run! proc coll)
Runs the supplied procedure (via reduce), for purposes of sideeffects, on successive items in the collection. Returns nil
Added in Clojure version 1.7
Source


satisfies?

function
Usage: (satisfies? protocol x)
Returns true if x satisfies the protocol
Added in Clojure version 1.2
Source


second

function
Usage: (second x)
Same as (first (next x))
Added in Clojure version 1.0
Source


select-keys

function
Usage: (select-keys map keyseq)
Returns a map containing only those entries in map whose key is in keys
Added in Clojure version 1.0
Source


send

function
Usage: (send a f & args)
Dispatch an action to an agent. Returns the agent immediately.Subsequently, in a thread from a thread pool, the state of the agentwill be set to the value of:(apply action-fn state-of-agent args)
Added in Clojure version 1.0
Source


send-off

function
Usage: (send-off a f & args)
Dispatch a potentially blocking action to an agent. Returns theagent immediately. Subsequently, in a separate thread, the state ofthe agent will be set to the value of:(apply action-fn state-of-agent args)
Added in Clojure version 1.0
Source


send-via

function
Usage: (send-via executor a f & args)
Dispatch an action to an agent. Returns the agent immediately.Subsequently, in a thread supplied by executor, the state of the agentwill be set to the value of:(apply action-fn state-of-agent args)
Added in Clojure version 1.5
Source


seq

function
Usage: (seq coll)
Returns a seq on the collection. If the collection isempty, returns nil.  (seq nil) returns nil. seq also works onStrings, native Java arrays (of reference types) and any objectsthat implement Iterable. Note that seqs cache values, thus seqshould not be used on any Iterable whose iterator repeatedlyreturns the same mutable object.
Added in Clojure version 1.0
Source


seq-to-map-for-destructuring

function
Usage: (seq-to-map-for-destructuring s)
Builds a map from a seq as described inhttps://clojure.org/reference/special_forms#keyword-arguments
Added in Clojure version 1.11
Source


seq?

function
Usage: (seq? x)
Return true if x implements ISeq
Added in Clojure version 1.0
Source


seqable?

function
Usage: (seqable? x)
Return true if the seq function is supported for x
Added in Clojure version 1.9
Source


seque

function
Usage: (seque s)       (seque n-or-q s)
Creates a queued seq on another (presumably lazy) seq s. The queuedseq will produce a concrete seq in the background, and can get up ton items ahead of the consumer. n-or-q can be an integer n buffersize, or an instance of java.util.concurrent BlockingQueue. Notethat reading from a seque can block if the reader gets ahead of theproducer.
Added in Clojure version 1.0
Source


sequence

function
Usage: (sequence coll)       (sequence xform coll)       (sequence xform coll & colls)
Coerces coll to a (possibly empty) sequence, if it is not alreadyone. Will not force a lazy seq. (sequence nil) yields (), When atransducer is supplied, returns a lazy sequence of applications ofthe transform to the items in coll(s), i.e. to the set of firstitems of each coll, followed by the set of seconditems in each coll, until any one of the colls is exhausted.  Anyremaining items in other colls are ignored. The transform should acceptnumber-of-colls arguments
Added in Clojure version 1.0
Source


sequential?

function
Usage: (sequential? coll)
Returns true if coll implements Sequential
Added in Clojure version 1.0
Source


set

function
Usage: (set coll)
Returns a set of the distinct elements of coll.
Added in Clojure version 1.0
Source


set!

special form
Usage: (set! var-symbol expr)       (set! (. instance-expr instanceFieldName-symbol) expr)       (set! (. Classname-symbol staticFieldName-symbol) expr)
Used to set thread-local-bound vars, Java object instancefields, and Java class static fields.Please seehttps://clojure.org/vars#set
Added in Clojure version 1.0


set-agent-send-executor!

function
Usage: (set-agent-send-executor! executor)
Sets the ExecutorService to be used by send
Added in Clojure version 1.5
Source


set-agent-send-off-executor!

function
Usage: (set-agent-send-off-executor! executor)
Sets the ExecutorService to be used by send-off
Added in Clojure version 1.5
Source


set-error-handler!

function
Usage: (set-error-handler! a handler-fn)
Sets the error-handler of agent a to handler-fn.  If an actionbeing run by the agent throws an exception or doesn't pass thevalidator fn, handler-fn will be called with two arguments: theagent and the exception.
Added in Clojure version 1.2
Source


set-error-mode!

function
Usage: (set-error-mode! a mode-keyword)
Sets the error-mode of agent a to mode-keyword, which must beeither :fail or :continue.  If an action being run by the agentthrows an exception or doesn't pass the validator fn, anerror-handler may be called (see set-error-handler!), after which,if the mode is :continue, the agent will continue as if neither theaction that caused the error nor the error itself ever happened.If the mode is :fail, the agent will become failed and will stopaccepting new 'send' and 'send-off' actions, and any previouslyqueued actions will be held until a 'restart-agent'.  Deref willstill work, returning the state of the agent before the error.
Added in Clojure version 1.2
Source


set-validator!

function
Usage: (set-validator! iref validator-fn)
Sets the validator-fn for a var/ref/agent/atom. validator-fn must be nil or aside-effect-free fn of one argument, which will be passed the intendednew state on any state change. If the new state is unacceptable, thevalidator-fn should return false or throw an exception. If the current state (rootvalue if var) is not acceptable to the new validator, an exceptionwill be thrown and the validator will not be changed.
Added in Clojure version 1.0
Source


set?

function
Usage: (set? x)
Returns true if x implements IPersistentSet
Added in Clojure version 1.0
Source


short

function
Usage: (short x)
Coerce to short
Added in Clojure version 1.0
Source


short-array

function
Usage: (short-array size-or-seq)       (short-array size init-val-or-seq)
Creates an array of shorts
Added in Clojure version 1.1
Source


shorts

function
Usage: (shorts xs)
Casts to shorts[]
Added in Clojure version 1.1
Source


shuffle

function
Usage: (shuffle coll)
Return a random permutation of coll
Added in Clojure version 1.2
Source


shutdown-agents

function
Usage: (shutdown-agents)
Initiates a shutdown of the thread pools that back the agentsystem. Running actions will complete, but no new actions will beaccepted
Added in Clojure version 1.0
Source


simple-ident?

function
Usage: (simple-ident? x)
Return true if x is a symbol or keyword without a namespace
Added in Clojure version 1.9
Source


simple-keyword?

function
Usage: (simple-keyword? x)
Return true if x is a keyword without a namespace
Added in Clojure version 1.9
Source


simple-symbol?

function
Usage: (simple-symbol? x)
Return true if x is a symbol without a namespace
Added in Clojure version 1.9
Source


slurp

function
Usage: (slurp f & opts)
Opens a reader on f and reads all its contents, returning a string.See clojure.java.io/reader for a complete list of supported arguments.
Added in Clojure version 1.0
Source


some

function
Usage: (some pred coll)
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 pred, for examplethis will return :fred if :fred is in the sequence, otherwise nil:(some #{:fred} coll)
Added in Clojure version 1.0
Source


some->

macro
Usage: (some-> 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
Added in Clojure version 1.5
Source


some->>

macro
Usage: (some->> 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
Added in Clojure version 1.5
Source


some-fn

function
Usage: (some-fn p)       (some-fn p1 p2)       (some-fn p1 p2 p3)       (some-fn p1 p2 p3 & ps)
Takes a set of predicates and returns a function f that returns the first logical true valuereturned by one of its composing predicates against any of its arguments, else it returnslogical false. Note that f is short-circuiting in that it will stop execution on the firstargument that triggers a logical true result against the original predicates.
Added in Clojure version 1.3
Source


some?

function
Usage: (some? x)
Returns true if x is not nil, false otherwise.
Added in Clojure version 1.6
Source


sort

function
Usage: (sort coll)       (sort comp coll)
Returns a sorted sequence of the items in coll. If no comparator issupplied, uses compare.  comparator must implementjava.util.Comparator.  Guaranteed to be stable: equal elements willnot be reordered.  If coll is a Java array, it will be modified.  Toavoid this, sort a copy of the array.
Added in Clojure version 1.0
Source


sort-by

function
Usage: (sort-by keyfn coll)       (sort-by keyfn comp coll)
Returns a sorted sequence of the items in coll, where the sortorder is determined by comparing (keyfn item).  If no comparator issupplied, uses compare.  comparator must implementjava.util.Comparator.  Guaranteed to be stable: equal elements willnot be reordered.  If coll is a Java array, it will be modified.  Toavoid this, sort a copy of the array.
Added in Clojure version 1.0
Source


sorted-map

function
Usage: (sorted-map & keyvals)
keyval => key valReturns a new sorted map with supplied mappings.  If any keys areequal, they are handled as if by repeated uses of assoc.
Added in Clojure version 1.0
Source


sorted-map-by

function
Usage: (sorted-map-by comparator & keyvals)
keyval => key valReturns a new sorted map with supplied mappings, using the suppliedcomparator.  If any keys are equal, they are handled as if byrepeated uses of assoc.
Added in Clojure version 1.0
Source


sorted-set

function
Usage: (sorted-set & keys)
Returns a new sorted set with supplied keys.  Any equal keys arehandled as if by repeated uses of conj.
Added in Clojure version 1.0
Source


sorted-set-by

function
Usage: (sorted-set-by comparator & keys)
Returns a new sorted set with supplied keys, using the suppliedcomparator.  Any equal keys are handled as if by repeated uses ofconj.
Added in Clojure version 1.1
Source


sorted?

function
Usage: (sorted? coll)
Returns true if coll implements Sorted
Added in Clojure version 1.0
Source


special-symbol?

function
Usage: (special-symbol? s)
Returns true if s names a special form
Added in Clojure version 1.0
Source


spit

function
Usage: (spit f content & options)
Opposite of slurp.  Opens f with writer, writes content, thencloses f. Options passed to clojure.java.io/writer.
Added in Clojure version 1.2
Source


split-at

function
Usage: (split-at n coll)
Returns a vector of [(take n coll) (drop n coll)]
Added in Clojure version 1.0
Source


split-with

function
Usage: (split-with pred coll)
Returns a vector of [(take-while pred coll) (drop-while pred coll)]
Added in Clojure version 1.0
Source


splitv-at

function
Usage: (splitv-at n coll)
Returns a vector of [(into [] (take n) coll) (drop n coll)]
Added in Clojure version 1.12
Source


str

function
Usage: (str)       (str x)       (str x & ys)
With no args, returns the empty string. With one arg x, returnsx.toString().  (str nil) returns the empty string. With more thanone arg, returns the concatenation of the str values of the args.
Added in Clojure version 1.0
Source


stream-into!

function
Usage: (stream-into! to stream)       (stream-into! to xform stream)
Returns a new coll consisting of coll with all of the items of thestream conjoined. This is a terminal operation on the stream.
Added in Clojure version 1.12
Source


stream-reduce!

function
Usage: (stream-reduce! f s)       (stream-reduce! f init s)
Works like reduce but takes a java.util.stream.BaseStream as its source.Honors 'reduced', is a terminal operation on the stream
Added in Clojure version 1.12
Source


stream-seq!

function
Usage: (stream-seq! stream)
Takes a java.util.stream.BaseStream instance s and returns a seq of itscontents. This is a terminal operation on the stream.
Added in Clojure version 1.12
Source


stream-transduce!

function
Usage: (stream-transduce! xform f stream)       (stream-transduce! xform f init stream)
Works like transduce but takes a java.util.stream.BaseStream as its source.This is a terminal operation on the stream.
Added in Clojure version 1.12
Source


string?

function
Usage: (string? x)
Return true if x is a String
Added in Clojure version 1.0
Source


struct

function
Usage: (struct s & vals)
Returns a new structmap instance with the keys of thestructure-basis. vals must be supplied for basis keys in order -where values are not supplied they will default to nil.
Added in Clojure version 1.0
Source


struct-map

function
Usage: (struct-map s & inits)
Returns a new structmap instance with the keys of thestructure-basis. keyvals may contain all, some or none of the basiskeys - where values are not supplied they will default to nil.keyvals can also contain keys not in the basis.
Added in Clojure version 1.0
Source


subs

function
Usage: (subs s start)       (subs s start end)
Returns the substring of s beginning at start inclusive, and endingat end (defaults to length of string), exclusive.
Added in Clojure version 1.0
Source


subseq

function
Usage: (subseq sc test key)       (subseq sc start-test start-key end-test end-key)
sc must be a sorted collection, test(s) one of <, <=, > or>=. Returns a seq of those entries with keys ek forwhich (test (.. sc comparator (compare ek key)) 0) is true
Added in Clojure version 1.0
Source


subvec

function
Usage: (subvec v start)       (subvec v start end)
Returns a persistent vector of the items in vector fromstart (inclusive) to end (exclusive).  If end is not supplied,defaults to (count vector). This operation is O(1) and very fast, asthe resulting vector shares structure with the original and notrimming is done.
Added in Clojure version 1.0
Source


supers

function
Usage: (supers class)
Returns the immediate and indirect superclasses and interfaces of c, if any
Added in Clojure version 1.0
Source


swap!

function
Usage: (swap! atom f)       (swap! atom f x)       (swap! atom f x y)       (swap! 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 calledmultiple times, and thus should be free of side effects.  Returnsthe value that was swapped in.
Added in Clojure version 1.0
Source


swap-vals!

function
Usage: (swap-vals! atom f)       (swap-vals! atom f x)       (swap-vals! atom f x y)       (swap-vals! 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 calledmultiple times, and thus should be free of side effects.Returns [old new], the value of the atom before and after the swap.
Added in Clojure version 1.9
Source


symbol

function
Usage: (symbol name)       (symbol ns name)
Returns a Symbol with the given namespace and name. Arity-1 workson strings, keywords, and vars.
Added in Clojure version 1.0
Source


symbol?

function
Usage: (symbol? x)
Return true if x is a Symbol
Added in Clojure version 1.0
Source


sync

macro
Usage: (sync flags-ignored-for-now & body)
transaction-flags => TBD, pass nil for nowRuns the exprs (in an implicit do) in a transaction that encompassesexprs and any nested calls.  Starts a transaction if none is alreadyrunning on this thread. Any uncaught exception will abort thetransaction and flow out of sync. The exprs may be run more thanonce, but any effects on Refs will be atomic.
Added in Clojure version 1.0
Source


tagged-literal

function
Usage: (tagged-literal tag form)
Construct a data representation of a tagged literal from atag symbol and a form.
Added in Clojure version 1.7
Source


tagged-literal?

function
Usage: (tagged-literal? value)
Return true if the value is the data representation of a tagged literal
Added in Clojure version 1.7
Source


take

function
Usage: (take n)       (take n coll)
Returns a lazy sequence of the first n items in coll, or all items ifthere are fewer than n.  Returns a stateful transducer whenno collection is provided.
Added in Clojure version 1.0
Source


take-last

function
Usage: (take-last n coll)
Returns a seq of the last n items in coll.  Depending on the typeof coll may be no better than linear time.  For vectors, see also subvec.
Added in Clojure version 1.1
Source


take-nth

function
Usage: (take-nth n)       (take-nth n coll)
Returns a lazy seq of every nth item in coll.  Returns a statefultransducer when no collection is provided.
Added in Clojure version 1.0
Source


take-while

function
Usage: (take-while pred)       (take-while pred coll)
Returns a lazy sequence of successive items from coll while(pred item) returns logical true. pred must be free of side-effects.Returns a transducer when no collection is provided.
Added in Clojure version 1.0
Source


tap>

function
Usage: (tap> x)
sends x to any taps. Will not block. Returns true if there was room in the queue,false if not (dropped).
Added in Clojure version 1.10
Source


test

function
Usage: (test v)
test [v] finds fn at key :test in var metadata and calls it,presuming failure will throw exception
Added in Clojure version 1.0
Source


the-ns

function
Usage: (the-ns x)
If passed a namespace, returns it. Else, when passed a symbol,returns the namespace named by it, throwing an exception if notfound.
Added in Clojure version 1.0
Source


thread-bound?

function
Usage: (thread-bound? & vars)
Returns true if all of the vars provided as arguments have thread-local bindings.Implies that set!'ing the provided vars will succeed.  Returns true if no vars are provided.
Added in Clojure version 1.2
Source


throw

special form
Usage: (throw expr)
The expr is evaluated and thrown, therefore it shouldyield an instance of some derivee of Throwable.Please seehttps://clojure.org/reference/special_forms#throw
Added in Clojure version 1.0


time

macro
Usage: (time expr)
Evaluates expr and prints the time it took.  Returns the value ofexpr.
Added in Clojure version 1.0
Source


to-array

function
Usage: (to-array coll)
Returns an array of Objects containing the contents of coll, whichcan be any Collection.  Maps to java.util.Collection.toArray().
Added in Clojure version 1.0
Source


to-array-2d

function
Usage: (to-array-2d coll)
Returns a (potentially-ragged) 2-dimensional array of Objectscontaining the contents of coll, which can be any Collection of anyCollection.
Added in Clojure version 1.0
Source


trampoline

function
Usage: (trampoline f)       (trampoline f & args)
trampoline can be used to convert algorithms requiring mutualrecursion without stack consumption. Calls f with supplied args, ifany. If f returns a fn, calls that fn with no arguments, andcontinues to repeat, until the return value is not a fn, thenreturns that non-fn value. Note that if you want to return a fn as afinal value, you must wrap it in some data structure and unpack itafter trampoline returns.
Added in Clojure version 1.0
Source


transduce

function
Usage: (transduce xform f coll)       (transduce xform f init coll)
reduce with a transformation of f (xf). If init is notsupplied, (f) will be called to produce it. f should be a reducingstep function that accepts both 1 and 2 arguments, if it acceptsonly 2 you can add the arity-1 with 'completing'. Returns the resultof applying (the transformed) xf to init and the first item in coll,then applying xf to that result and the 2nd item, etc. If collcontains no items, returns init and f is not called. Note thatcertain transforms may inject or skip items.
Added in Clojure version 1.7
Source


transient

function
Usage: (transient coll)
Returns a new, transient version of the collection, in constant time.Transients support a parallel set of 'changing' operations, with similar namesfollowed by ! - assoc!, conj! etc. These do the same things as their persistentcounterparts except the return values are themselves transient.Note in particular that transients are not designed to be bashed in-place. Youmust capture and use the return value in the next call. In this way, they supportthe same code structure as the functional persistent code they replace.
Added in Clojure version 1.1
Source


tree-seq

function
Usage: (tree-seq branch? children root)
Returns a lazy sequence of the nodes in a tree, via a depth-first walk. branch? must be a fn of one arg that returns true if passed a node that can have children (but may not).  children must be a fn of one arg that returns a sequence of the children. Will only be called on nodes for which branch? returns true. Root is the root node of thetree.
Added in Clojure version 1.0
Source


true?

function
Usage: (true? x)
Returns true if x is the value true, false otherwise.
Added in Clojure version 1.0
Source


try

special form
Usage: (try expr* catch-clause* finally-clause?)
catch-clause => (catch classname name expr*)finally-clause => (finally expr*)Catches and handles Java exceptions.Please seehttps://clojure.org/reference/special_forms#try
Added in Clojure version 1.0


type

function
Usage: (type x)
Returns the :type metadata of x, or its Class if none
Added in Clojure version 1.0
Source


unchecked-add

function
Usage: (unchecked-add x y)
Returns the sum of x and y, both long.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


unchecked-add-int

function
Usage: (unchecked-add-int x y)
Returns the sum of x and y, both int.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


unchecked-byte

function
Usage: (unchecked-byte x)
Coerce to byte. Subject to rounding or truncation.
Added in Clojure version 1.3
Source


unchecked-char

function
Usage: (unchecked-char x)
Coerce to char. Subject to rounding or truncation.
Added in Clojure version 1.3
Source


unchecked-dec

function
Usage: (unchecked-dec x)
Returns a number one less than x, a long.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


unchecked-dec-int

function
Usage: (unchecked-dec-int x)
Returns a number one less than x, an int.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


unchecked-divide-int

function
Usage: (unchecked-divide-int x y)
Returns the division of x by y, both int.Note - uses a primitive operator subject to truncation.
Added in Clojure version 1.0
Source


unchecked-double

function
Usage: (unchecked-double x)
Coerce to double. Subject to rounding.
Added in Clojure version 1.3
Source


unchecked-float

function
Usage: (unchecked-float x)
Coerce to float. Subject to rounding.
Added in Clojure version 1.3
Source


unchecked-inc

function
Usage: (unchecked-inc x)
Returns a number one greater than x, a long.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


unchecked-inc-int

function
Usage: (unchecked-inc-int x)
Returns a number one greater than x, an int.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


unchecked-int

function
Usage: (unchecked-int x)
Coerce to int. Subject to rounding or truncation.
Added in Clojure version 1.3
Source


unchecked-long

function
Usage: (unchecked-long x)
Coerce to long. Subject to rounding or truncation.
Added in Clojure version 1.3
Source


unchecked-multiply

function
Usage: (unchecked-multiply x y)
Returns the product of x and y, both long.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


unchecked-multiply-int

function
Usage: (unchecked-multiply-int x y)
Returns the product of x and y, both int.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


unchecked-negate

function
Usage: (unchecked-negate x)
Returns the negation of x, a long.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


unchecked-negate-int

function
Usage: (unchecked-negate-int x)
Returns the negation of x, an int.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


unchecked-remainder-int

function
Usage: (unchecked-remainder-int x y)
Returns the remainder of division of x by y, both int.Note - uses a primitive operator subject to truncation.
Added in Clojure version 1.0
Source


unchecked-short

function
Usage: (unchecked-short x)
Coerce to short. Subject to rounding or truncation.
Added in Clojure version 1.3
Source


unchecked-subtract

function
Usage: (unchecked-subtract x y)
Returns the difference of x and y, both long.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


unchecked-subtract-int

function
Usage: (unchecked-subtract-int x y)
Returns the difference of x and y, both int.Note - uses a primitive operator subject to overflow.
Added in Clojure version 1.0
Source


underive

function
Usage: (underive tag parent)       (underive h tag parent)
Removes a parent/child relationship between parent andtag. h must be a hierarchy obtained from make-hierarchy, if notsupplied defaults to, and modifies, the global hierarchy.
Added in Clojure version 1.0
Source


unreduced

function
Usage: (unreduced x)
If x is reduced?, returns (deref x), else returns x
Added in Clojure version 1.7
Source


unsigned-bit-shift-right

function
Usage: (unsigned-bit-shift-right x n)
Bitwise shift right, without sign-extension.
Added in Clojure version 1.6
Source


update

function
Usage: (update m k f)       (update m k f x)       (update m k f x y)       (update m k f x y z)       (update m k f x y z & more)
'Updates' a value in an associative structure, where k is akey and f is a function that will take the old valueand any supplied args and return the new value, and returns a newstructure.  If the key does not exist, nil is passed as the old value.
Added in Clojure version 1.7
Source


update-in

function
Usage: (update-in m ks f & args)
'Updates' a value in a nested associative structure, where ks is asequence of keys and f is a function that will take the old valueand any supplied args and return the new value, and returns a newnested structure.  If any levels do not exist, hash-maps will becreated.
Added in Clojure version 1.0
Source


update-keys

function
Usage: (update-keys m f)
m f => {(f k) v ...}Given a map m and a function f of 1-argument, returns a new map whosekeys are the result of applying f to the keys of m, mapped to thecorresponding values of m.f must return a unique key for each key of m, else the behavior is undefined.
Added in Clojure version 1.11
Source


update-proxy

function
Usage: (update-proxy proxy mappings)
Takes a proxy instance and a map of strings (which mustcorrespond to methods of the proxy superclass/superinterfaces) tofns (which must take arguments matching the corresponding method,plus an additional (explicit) first arg corresponding to this, andupdates (via assoc) the proxy's fn map. nil can be passed instead ofa fn, in which case the corresponding method will revert to thedefault behavior. Note that this function can be used to update thebehavior of an existing instance without changing its identity.Returns the proxy.
Added in Clojure version 1.0
Source


update-vals

function
Usage: (update-vals m f)
m f => {k (f v) ...}Given a map m and a function f of 1-argument, returns a new map where the keys of mare mapped to result of applying f to the corresponding values of m.
Added in Clojure version 1.11
Source


uri?

function
Usage: (uri? x)
Return true if x is a java.net.URI
Added in Clojure version 1.9
Source


use

function
Usage: (use & args)
Like 'require, but also refers to each lib's namespace usingclojure.core/refer. Use :use in the ns macro in preference to callingthis directly.'use accepts additional options in libspecs: :exclude, :only, :rename.The arguments and semantics for :exclude, :only, and :rename are the sameas those documented for clojure.core/refer.
Added in Clojure version 1.0
Source


uuid?

function
Usage: (uuid? x)
Return true if x is a java.util.UUID
Added in Clojure version 1.9
Source


val

function
Usage: (val e)
Returns the value in the map entry.
Added in Clojure version 1.0
Source


vals

function
Usage: (vals map)
Returns a sequence of the map's values, in the same order as (seq map).
Added in Clojure version 1.0
Source


var

special form
Usage: (var symbol)
The symbol must resolve to a var, and the Var objectitself (not its value) is returned. The reader macro #'xexpands to (var x).Please seehttps://clojure.org/reference/special_forms#var
Added in Clojure version 1.0


var-get

function
Usage: (var-get x)
Gets the value in the var object
Added in Clojure version 1.0
Source


var-set

function
Usage: (var-set x val)
Sets the value in the var object to val. The var must bethread-locally bound.
Added in Clojure version 1.0
Source


var?

function
Usage: (var? v)
Returns true if v is of type clojure.lang.Var
Added in Clojure version 1.0
Source


vary-meta

function
Usage: (vary-meta obj f & args)
Returns an object of the same type and value as obj, with(apply f (meta obj) args) as its metadata.
Added in Clojure version 1.0
Source


vec

function
Usage: (vec coll)
Creates a new vector containing the contents of coll. Java arrayswill be aliased and should not be modified.
Added in Clojure version 1.0
Source


vector

function
Usage: (vector)       (vector a)       (vector a b)       (vector a b c)       (vector a b c d)       (vector a b c d e)       (vector a b c d e f)       (vector a b c d e f & args)
Creates a new vector containing the args.
Added in Clojure version 1.0
Source


vector-of

function
Usage: (vector-of t)       (vector-of t & elements)
Creates a new vector of a single primitive type t, where t is oneof :int :long :float :double :byte :short :char or :boolean. Theresulting vector complies with the interface of vectors in general,but stores the values unboxed internally.Optionally takes one or more elements to populate the vector.
Added in Clojure version 1.2
Source


vector?

function
Usage: (vector? x)
Return true if x implements IPersistentVector
Added in Clojure version 1.0
Source


volatile!

function
Usage: (volatile! val)
Creates and returns a Volatile with an initial value of val.
Added in Clojure version 1.7
Source


volatile?

function
Usage: (volatile? x)
Returns true if x is a volatile.
Added in Clojure version 1.7
Source


vreset!

function
Usage: (vreset! vol newval)
Sets the value of volatile to newval without regard for thecurrent value. Returns newval.
Added in Clojure version 1.7
Source


vswap!

macro
Usage: (vswap! vol f & args)
Non-atomically swaps the value of the volatile as if:(apply f current-value-of-vol args). Returns the value thatwas swapped in.
Added in Clojure version 1.7
Source


when

macro
Usage: (when test & body)
Evaluates test. If logical true, evaluates body in an implicit do.
Added in Clojure version 1.0
Source


when-first

macro
Usage: (when-first bindings & body)
bindings => x xsRoughly the same as (when (seq xs) (let [x (first xs)] body)) but xs is evaluated only once
Added in Clojure version 1.0
Source


when-let

macro
Usage: (when-let bindings & body)
bindings => binding-form testWhen test is true, evaluates body with binding-form bound to the value of test
Specs:  Args: (fspec          :args          (cat           :bindings (and vector? :clojure.core.specs.alpha/binding)           :body (* any?))          :ret          any?          :fn          nil)  Ret:  (fspec          :args          (cat           :bindings (and vector? :clojure.core.specs.alpha/binding)           :body (* any?))          :ret          any?          :fn          nil)
Added in Clojure version 1.0
Source


when-not

macro
Usage: (when-not test & body)
Evaluates test. If logical false, evaluates body in an implicit do.
Added in Clojure version 1.0
Source


when-some

macro
Usage: (when-some bindings & body)
bindings => binding-form testWhen test is not nil, evaluates body with binding-form bound to thevalue of test
Added in Clojure version 1.6
Source


while

macro
Usage: (while test & body)
Repeatedly executes body while test expression is true. Presumessome side-effect will cause test to become false/nil. Returns nil
Added in Clojure version 1.0
Source


with-bindings

macro
Usage: (with-bindings binding-map & body)
Takes a map of Var/value pairs. Installs for the given Vars the associatedvalues as thread-local bindings. Then executes body. Pops the installedbindings after body was evaluated. Returns the value of body.
Added in Clojure version 1.1
Source


with-bindings*

function
Usage: (with-bindings* binding-map f & args)
Takes a map of Var/value pairs. Installs for the given Vars the associatedvalues as thread-local bindings. Then calls f with the supplied arguments.Pops the installed bindings after f returned. Returns whatever f returns.
Added in Clojure version 1.1
Source


with-in-str

macro
Usage: (with-in-str s & body)
Evaluates body in a context in which *in* is bound to a freshStringReader initialized with the string s.
Added in Clojure version 1.0
Source


with-local-vars

macro
Usage: (with-local-vars name-vals-vec & body)
varbinding=> symbol init-exprExecutes the exprs in a context in which the symbols are bound tovars with per-thread bindings to the init-exprs.  The symbols referto the var objects themselves, and must be accessed with var-get andvar-set
Added in Clojure version 1.0
Source


with-meta

function
Usage: (with-meta obj m)
Returns an object of the same type and value as obj, withmap m as its metadata.
Added in Clojure version 1.0
Source


with-open

macro
Usage: (with-open bindings & body)
bindings => [name init ...]Evaluates body in a try expression with names bound to the valuesof the inits, and a finally clause that calls (.close name) on eachname in reverse order.
Added in Clojure version 1.0
Source


with-out-str

macro
Usage: (with-out-str & body)
Evaluates exprs in a context in which *out* is bound to a freshStringWriter.  Returns the string created by any nested printingcalls.
Added in Clojure version 1.0
Source


with-precision

macro
Usage: (with-precision precision & exprs)
Sets the precision and rounding mode to be used for BigDecimal operations.Usage: (with-precision 10 (/ 1M 3))or:    (with-precision 10 :rounding HALF_DOWN (/ 1M 3))The rounding mode is one of CEILING, FLOOR, HALF_UP, HALF_DOWN,HALF_EVEN, UP, DOWN and UNNECESSARY; it defaults to HALF_UP.
Added in Clojure version 1.0
Source


with-redefs

macro
Usage: (with-redefs bindings & body)
binding => var-symbol temp-value-exprTemporarily redefines Vars while executing the body.  Thetemp-value-exprs will be evaluated and each resulting value willreplace in parallel the root value of its Var.  After the body isexecuted, the root values of all the Vars will be set back to theirold values.  These temporary changes will be visible in all threads.Useful for mocking out functions during testing.
Added in Clojure version 1.3
Source


with-redefs-fn

function
Usage: (with-redefs-fn binding-map func)
Temporarily redefines Vars during a call to func.  Each val ofbinding-map will replace the root value of its key which must bea Var.  After func is called with no args, the root values of allthe Vars will be set back to their old values.  These temporarychanges will be visible in all threads.  Useful for mocking outfunctions during testing.
Added in Clojure version 1.3
Source


xml-seq

function
Usage: (xml-seq root)
A tree seq on the xml elements as per xml/parse
Added in Clojure version 1.0
Source


zero?

function
Usage: (zero? num)
Returns true if num is zero, else false
Added in Clojure version 1.0
Source


zipmap

function
Usage: (zipmap keys vals)
Returns a map with the keys mapped to the corresponding vals.
Added in Clojure version 1.0
Source

clojure.core.protocols


Protocols



CollReduce

Protocol
Protocol for collection types that can implement reduce faster thanfirst/next recursion. Called by clojure.core/reduce. Baselineimplementation defined in terms of Iterable.
Known implementations:clojure.core.reducers.Cat, clojure.lang.APersistentMap$KeySeq, clojure.lang.APersistentMap$ValSeq, clojure.lang.ASeq, clojure.lang.IReduceInit, clojure.lang.LazySeq, clojure.lang.PersistentVector, java.lang.Iterable, nil, Object

coll-reduce

function
Usage: (coll-reduce coll f)       (coll-reduce coll f val)
Source


Datafiable

Protocol
    Known implementations:clojure.lang.IRef, clojure.lang.Namespace, java.lang.Class, java.lang.Throwable, nil, Object

datafy

function
Usage: (datafy o)
return a representation of o as data (default identity)
Source


IKVReduce

Protocol
Protocol for concrete associative types that can reduce themselvesvia a function of key and val faster than first/next recursion over mapentries. Called by clojure.core/reduce-kv, and has samesemantics (just different arg order).
Known implementations:clojure.lang.IKVReduce, nil, Object

kv-reduce

function
Usage: (kv-reduce amap f init)
Source


InternalReduce

Protocol
Protocol for concrete seq types that can reduce themselvesfaster than first/next recursion. Called by clojure.core/reduce.
Known implementations:clojure.core.VecSeq, clojure.lang.IChunkedSeq, clojure.lang.StringSeq, nil, Object

internal-reduce

function
Usage: (internal-reduce seq f start)
Source


Navigable

Protocol
    Known implementations:Object

nav

function
Usage: (nav coll k v)
return (possibly transformed) v in the context of coll and k (a key/index or nil),defaults to returning v.
Source

clojure.core.reducers

A library for reduction and parallel folding. Alpha and subjectto change.

Types



Cat

type
    Fields:[cnt left right]
Protocols:clojure.core.protocols/CollReduce,CollFold
Interfaces:clojure.lang.Counted, clojure.lang.Seqable

Public Variables and Functions



->Cat

function
Usage: (->Cat cnt left right)
Positional factory function for class clojure.core.reducers.Cat.
Source


append!

function
Usage: (append! acc x)
.adds x to acc and returns acc
Added in Clojure version 1.5
Source


cat

function
Usage: (cat)       (cat ctor)       (cat left right)
A high-performance combining fn that yields the catenation of thereduced values. The result is reducible, foldable, seqable andcounted, providing the identity collections are reducible, seqableand counted. The single argument version will build a combining fnwith the supplied identity constructor. Tests for identitywith (zero? (count x)). See also foldcat.
Added in Clojure version 1.5
Source


drop

function
Usage: (drop n)       (drop n coll)
Elides the first n values from the reduction of coll.
Added in Clojure version 1.5
Source


filter

function
Usage: (filter pred)       (filter pred coll)
Retains values in the reduction of coll for which (pred val)returns logical true. Foldable.
Added in Clojure version 1.5
Source


flatten

function
Usage: (flatten)       (flatten coll)
Takes any nested combination of sequential things (lists, vectors,etc.) and returns their contents as a single, flat foldablecollection.
Added in Clojure version 1.5
Source


fold

function
Usage: (fold reducef coll)       (fold combinef reducef coll)       (fold n combinef reducef coll)
Reduces a collection using a (potentially parallel) reduce-combinestrategy. The collection is partitioned into groups of approximatelyn (default 512), each of which is reduced with reducef (with a seedvalue obtained by calling (combinef) with no arguments). The resultsof these reductions are then reduced with combinef (defaultreducef). combinef must be associative, and, when called with noarguments, (combinef) must produce its identity element. Theseoperations may be performed in parallel, but the results willpreserve order.
Added in Clojure version 1.5
Source


foldcat

function
Usage: (foldcat coll)
Equivalent to (fold cat append! coll)
Added in Clojure version 1.5
Source


folder

function
Usage: (folder coll xf)
Given a foldable collection, and a transformation function xf,returns a foldable collection, where any supplied reducingfn will be transformed by xf. xf is a function of reducing fn toreducing fn.
Added in Clojure version 1.5
Source


map

function
Usage: (map f)       (map f coll)
Applies f to every value in the reduction of coll. Foldable.
Added in Clojure version 1.5
Source


mapcat

function
Usage: (mapcat f)       (mapcat f coll)
Applies f to every value in the reduction of coll, concatenating the resultcolls of (f val). Foldable.
Added in Clojure version 1.5
Source


monoid

function
Usage: (monoid op ctor)
Builds a combining fn out of the supplied operator and identityconstructor. op must be associative and ctor called with no argsmust return an identity value for it.
Added in Clojure version 1.5
Source


reduce

function
Usage: (reduce f coll)       (reduce f init coll)
Like core/reduce except:When init is not provided, (f) is used.Maps are reduced with reduce-kv
Source


reducer

function
Usage: (reducer coll xf)
Given a reducible collection, and a transformation function xf,returns a reducible collection, where any supplied reducingfn will be transformed by xf. xf is a function of reducing fn toreducing fn.
Added in Clojure version 1.5
Source


remove

function
Usage: (remove pred)       (remove pred coll)
Removes values in the reduction of coll for which (pred val)returns logical true. Foldable.
Added in Clojure version 1.5
Source


take

function
Usage: (take n)       (take n coll)
Ends the reduction of coll after consuming n values.
Added in Clojure version 1.5
Source


take-while

function
Usage: (take-while pred)       (take-while pred coll)
Ends the reduction of coll when (pred val) returns logical false.
Added in Clojure version 1.5
Source

clojure.core.server

Socket server support

Public Variables and Functions



io-prepl

function
Usage: (io-prepl & {:keys [valf], :or {valf pr-str}})
prepl bound to *in* and *out*, suitable for use with e.g. server/repl (socket-repl).:ret and :tap vals will be processed by valf, a fn of one argumentor a symbol naming same (default pr-str)Alpha, subject to change.
Added in Clojure version 1.10
Source


prepl

function
Usage: (prepl in-reader out-fn & {:keys [stdin]})
a REPL with structured output (for programs)reads forms to eval from in-reader (a LineNumberingPushbackReader)Closing the input or passing the form :repl/quit will cause it to returnCalls out-fn with data, one of:{:tag :ret :val val ;;eval result, or Throwable->map data if exception thrown :ns ns-name-string :ms long ;;eval time in milliseconds :form string ;;iff successfully read :exception true ;;iff exception thrown}{:tag :out :val string} ;chars from during-eval *out*{:tag :err :val string} ;chars from during-eval *err*{:tag :tap :val val} ;values from tap>You might get more than one :out or :err per eval, but exactly one :rettap output can happen at any time (i.e. between evals)If during eval an attempt is made to read *in* it will read from in-reader unless :stdin is suppliedAlpha, subject to change.
Added in Clojure version 1.10
Source


remote-prepl

function
Usage: (remote-prepl host port in-reader out-fn & {:keys [valf readf], :or {valf read-string, readf (fn* [p1__6804# p2__6805#] (read p1__6804# false p2__6805#))}})
Implements a prepl on in-reader and out-fn by forwarding to aremote [io-]prepl over a socket.  Messages will be read by readf, afn of a LineNumberingPushbackReader and EOF value or a symbol namingsame (default #(read %1 false %2)),:ret and :tap vals will be processed by valf, a fn of one argumentor a symbol naming same (default read-string). If that functionthrows, :val will be unprocessed.Alpha, subject to change.
Added in Clojure version 1.10
Source


repl

function
Usage: (repl)
REPL with predefined hooks for attachable socket server.
Source


repl-init

function
Usage: (repl-init)
Initialize repl in user namespace and make standard repl requires.
Source


repl-read

function
Usage: (repl-read request-prompt request-exit)
Enhanced :read hook for repl supporting :repl/quit.
Source


start-server

function
Usage: (start-server opts)
Start a socket server given the specified opts: :address Host or address, string, defaults to loopback address :port Port, integer, required :name Name, required :accept Namespaced symbol of the accept function to invoke, required :args Vector of args to pass to accept function :bind-err Bind *err* to socket out stream?, defaults to true :server-daemon Is server thread a daemon?, defaults to true :client-daemon Are client threads daemons?, defaults to trueReturns server socket.
Source


start-servers

function
Usage: (start-servers system-props)
Start all servers specified in the system properties.
Source


stop-server

function
Usage: (stop-server)       (stop-server name)
Stop server with name or use the server-name from *session* if none supplied.Returns true if server stopped successfully, nil if not found, or throws ifthere is an error closing the socket.
Source


stop-servers

function
Usage: (stop-servers)
Stop all servers ignores all errors, and returns nil.
Source

clojure.core.specs.alpha


Public Variables and Functions



even-number-of-forms?

function
Usage: (even-number-of-forms? forms)
Returns true if there are an even number of forms in a binding vector

Specs



::as

spec
(and simple-symbol? (not= '& %))


::as-alias

spec
simple-symbol?


::binding

spec
(cat :form ::binding-form :init-expr any?)


::binding-form

spec
(or :local-symbol ::local-name :seq-destructure ::seq-binding-form :map-destructure ::map-binding-form)


::bindings

spec
(and vector? even-number-of-forms? (* ::binding))


::class-ident

spec
(or :class simple-symbol? :class-name string?)


::constructors

spec
(map-of ::signature ::signature)


::defn-args

spec
(cat :fn-name simple-symbol? :docstring (? string?) :meta (? map?) :fn-tail (alt           :arity-1 ::params+body           :arity-n (cat                     :bodies (+ (spec ::params+body))                     :attr-map (? map?))))


::exclude

spec
(coll-of simple-symbol?)


::expose

spec
(keys :opt-un [::get ::set])


::exposes

spec
(map-of simple-symbol? ::expose)


::extends

spec
simple-symbol?


::factory

spec
simple-symbol?


::filters

spec
(&  (* (cat :clojure.spec.alpha/k keyword? :clojure.spec.alpha/v any?))  :clojure.spec.alpha/kvs->map  mspec__2533__auto__)


::get

spec
simple-symbol?


::impl-ns

spec
simple-symbol?


::implements

spec
(coll-of simple-symbol? :kind vector?)


::import-list

spec
(* (alt :class simple-symbol? :package-list ::package-list))


::init

spec
symbol?


::keys

spec
(coll-of ident? :kind vector?)


::libspec

spec
(alt :lib simple-symbol? :lib+opts (spec             (cat              :lib simple-symbol?              :options (keys* :opt-un [::as ::refer ::as-alias]))))


::load-impl-ns

spec
boolean?


::local-name

spec
(and simple-symbol? (not= '& %))


::main

spec
boolean?


::map-binding

spec
(tuple ::binding-form any?)


::map-binding-form

spec
(merge ::map-bindings ::map-special-binding)


::map-bindings

spec
(every  (or   :map-binding ::map-binding   :qualified-keys-or-syms ::ns-keys   :special-binding (tuple #{:as :or :syms :keys :strs} any?))  :kind  map?)


::map-special-binding

spec
(keys :opt-un [::as ::or ::keys ::syms ::strs])


::method

spec
(and  vector?  (cat   :method-name simple-symbol?   :param-types ::signature   :return-type ::class-ident))


::methods

spec
(coll-of ::method :kind vector?)


::name

spec
simple-symbol?


::ns-clauses

spec
(*  (alt   :refer-clojure ::ns-refer-clojure   :require ::ns-require   :import ::ns-import   :use ::ns-use   :refer ::ns-refer   :load ::ns-load   :gen-class ::ns-gen-class))


::ns-form

spec
(cat :ns-name simple-symbol? :docstring (? string?) :attr-map (? map?) :ns-clauses ::ns-clauses)


::ns-gen-class

spec
(cat :clause #{:gen-class} :options (keys*            :opt-un            [::name             ::extends             ::implements             ::init             ::constructors             ::post-init             ::methods             ::main             ::factory             ::state             ::exposes             ::prefix             ::impl-ns             ::load-impl-ns]))


::ns-import

spec
(cat :clause #{:import} :classes ::import-list)


::ns-keys

spec
(tuple  (and qualified-keyword? #(-> % name #{"syms" "keys"}))  (coll-of simple-symbol? :kind vector?))


::ns-load

spec
(cat :clause #{:load} :libs (* string?))


::ns-refer

spec
(cat :clause #{:refer} :lib simple-symbol? :refer-filters ::filters)


::ns-refer-clojure

spec
(cat :clause #{:refer-clojure} :refer-filters ::filters)


::ns-require

spec
(cat :clause #{:require} :body (+         (alt          :libspec ::libspec          :prefix-list ::prefix-list          :flag #{:verbose :reload :reload-all})))


::ns-use

spec
(cat :clause #{:use} :libs (+         (alt          :libspec ::use-libspec          :prefix-list ::use-prefix-list          :flag #{:verbose :reload :reload-all})))


::only

spec
(coll-of simple-symbol?)


::or

spec
(map-of simple-symbol? any?)


::package-list

spec
(cat :package simple-symbol? :classes (+ simple-symbol?))


::param-list

spec
(and  vector?  (cat   :params (* ::binding-form)   :var-params (? (cat :ampersand #{'&} :var-form ::binding-form))))


::params+body

spec
(cat :params ::param-list :body (alt        :prepost+body (cat :prepost map? :body (+ any?))        :body (* any?)))


::post-init

spec
symbol?


::prefix

spec
string?


::prefix-list

spec
(cat :prefix simple-symbol? :libspecs (+ ::libspec))


::quotable-import-list

spec
(*  (alt   :class (quotable simple-symbol?)   :package-list (quotable ::package-list)))


::refer

spec
(or :all #{:all} :syms (coll-of simple-symbol?))


::rename

spec
(map-of simple-symbol? simple-symbol?)


::seq-binding-form

spec
(and  vector?  (cat   :forms (* ::binding-form)   :rest-forms (? (cat :ampersand #{'&} :form ::binding-form))   :as-form (? (cat :as #{:as} :as-sym ::local-name))))


::set

spec
simple-symbol?


::signature

spec
(coll-of ::class-ident :kind vector?)


::state

spec
simple-symbol?


::strs

spec
(coll-of simple-symbol? :kind vector?)


::syms

spec
(coll-of symbol? :kind vector?)


::use-libspec

spec
(alt :lib simple-symbol? :lib+opts (spec             (cat              :lib simple-symbol?              :options (keys*                         :opt-un                         [::as ::refer ::exclude ::only ::rename]))))


::use-prefix-list

spec
(cat :prefix simple-symbol? :libspecs (+ ::use-libspec))
Copyright 2007-2024 by Rich Hickey
Logo & site design byTom Hickey.
Clojure auto-documentation system by Tom Faulhaber.

[8]ページ先頭

©2009-2025 Movatter.jp