Liking cljdoc? Tell your friends :D
Clojure only.

clojure.core

Fundamental library of the Clojure language

Fundamental library of the Clojure language
raw docstring

*clj

(*)
(* x)
(* x y)
(* x y & more)

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

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

*'clj

(*')
(*' x)
(*' x y)
(*' x y & more)

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

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

*1clj

bound in a repl thread to the most recent value printed

bound in a repl thread to the most recent value printed
raw docstring

*2clj

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

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

*3clj

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

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

*agent*clj

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

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

*allow-unresolved-vars*clj


*assert*clj


*clojure-version*clj

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"

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"
raw docstring

*command-line-args*clj

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

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

*compile-files*clj

Set to true when compiling files, false otherwise.

Set to true when compiling files, false otherwise.
raw docstring

*compile-path*clj

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

Defaults to "classes"

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

Defaults to "classes"
raw docstring

*compiler-options*clj

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 Alpha, subject to change.

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
Alpha, subject to change.
raw docstring

*data-readers*clj

Map from reader tag symbols to data reader Vars.

When Clojure starts, it searches for files named 'data_readers.clj' at the root of the classpath. Each such file must 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 by the Clojure reader. The second symbol in the pair is the fully-qualified name of a Var which will be invoked by the reader to parse the form following the tag. For example, given the data_readers.clj file above, the Clojure reader would parse this form:

#foo/bar [1 2 3]

by invoking the Var #'my.project.foo/bar on the vector [1 2 3]. The data reader function is invoked on the form AFTER it has been read as a normal Clojure data structure by the reader.

Reader tags without namespace qualifiers are reserved for Clojure. Default reader tags are defined in clojure.core/default-data-readers but may be overridden in data_readers.clj or by rebinding this Var.

Map from reader tag symbols to data reader Vars.

When Clojure starts, it searches for files named 'data_readers.clj'
at the root of the classpath. Each such file must 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 by
the Clojure reader. The second symbol in the pair is the
fully-qualified name of a Var which will be invoked by the reader to
parse the form following the tag. For example, given the
data_readers.clj file above, the Clojure reader would parse this
form:

    #foo/bar [1 2 3]

by invoking the Var #'my.project.foo/bar on the vector [1 2 3]. The
data reader function is invoked on the form AFTER it has been read
as a normal Clojure data structure by the reader.

Reader tags without namespace qualifiers are reserved for
Clojure. Default reader tags are defined in
clojure.core/default-data-readers but may be overridden in
data_readers.clj or by rebinding this Var.
raw docstring

*default-data-reader-fn*clj

When no data reader is found for a tag and default-data-reader-fn is non-nil, it will be called with two arguments, the tag and the value. If default-data-reader-fn is nil (the default), an exception will be thrown for the unknown tag.

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 (the
default), an exception will be thrown for the unknown tag.
raw docstring

*eclj

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

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

*err*clj

A java.io.Writer object representing standard error for print operations.

Defaults to System/err, wrapped in a PrintWriter

A java.io.Writer object representing standard error for print operations.

Defaults to System/err, wrapped in a PrintWriter
raw docstring

*file*clj

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.

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.
raw docstring

*flush-on-newline*clj

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

Defaults to true.

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

Defaults to true.
raw docstring

*fn-loader*clj


*in*clj

A java.io.Reader object representing standard input for read operations.

Defaults to System/in, wrapped in a LineNumberingPushbackReader

A java.io.Reader object representing standard input for read operations.

Defaults to System/in, wrapped in a LineNumberingPushbackReader
raw docstring

*math-context*clj


*ns*clj

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

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

*out*clj

A java.io.Writer object representing standard output for print operations.

Defaults to System/out, wrapped in an OutputStreamWriter

A java.io.Writer object representing standard output for print operations.

Defaults to System/out, wrapped in an OutputStreamWriter
raw docstring

*print-dup*clj

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

Defaults to false.

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

Defaults to false.
raw docstring

*print-length*clj

print-length controls how many items of each collection the printer will print. If it is bound to logical false, there is no limit. Otherwise, it must be bound to an integer indicating the maximum number of items of each collection to print. If a collection contains more items, the printer will print items up to the limit followed by '...' to represent the remaining items. The root binding is nil indicating no limit.

*print-length* controls how many items of each collection the
printer will print. If it is bound to logical false, there is no
limit. Otherwise, it must be bound to an integer indicating the maximum
number of items of each collection to print. If a collection contains
more items, the printer will print items up to the limit followed by
'...' to represent the remaining items. The root binding is nil
indicating no limit.
raw docstring

*print-level*clj

print-level controls how many levels deep the printer will print nested objects. If it is bound to logical false, there is no limit. Otherwise, it must be bound to an integer indicating the maximum level to print. Each argument to print is at level 0; if an argument is a collection, its items are at level 1; and so on. If an object is a collection and is at a level greater than or equal to the value bound to print-level, the printer prints '#' to represent it. The root binding is nil indicating no limit.

*print-level* controls how many levels deep the printer will
print nested objects. If it is bound to logical false, there is no
limit. Otherwise, it must be bound to an integer indicating the maximum
level to print. Each argument to print is at level 0; if an argument is a
collection, its items are at level 1; and so on. If an object is a
collection and is at a level greater than or equal to the value bound to
*print-level*, the printer prints '#' to represent it. The root binding
is nil indicating no limit.
raw docstring

*print-meta*clj

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

Defaults to false.

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

Defaults to false.
raw docstring

*print-readably*clj

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

Defaults to true

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

Defaults to true
raw docstring

*read-eval*clj

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 be used 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 line like 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 binding is :unknown and all reads will fail in contexts where read-eval has not been explicitly bound to either true or false. This setting can be a useful diagnostic tool to ensure that all of your reads occur in considered contexts. You can also accomplish this in a particular scope by binding read-eval to :unknown

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 be
used 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 line
like 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 binding
is :unknown and all reads will fail in contexts where *read-eval*
has not been explicitly bound to either true or false. This setting
can be a useful diagnostic tool to ensure that all of your reads
occur in considered contexts. You can also accomplish this in a
particular scope by binding *read-eval* to :unknown
raw docstring

*source-path*clj


*suppress-read*clj


*unchecked-math*clj

While bound to true, compilations of +, -, *, inc, dec and the coercions will be done without overflow checks. While bound to :warn-on-boxed, same behavior as true, and a warning is emitted when compilation uses boxed math. Default: false.

While bound to true, compilations of +, -, *, inc, dec and the
coercions will be done without overflow checks. While bound
to :warn-on-boxed, same behavior as true, and a warning is emitted
when compilation uses boxed math. Default: false.
raw docstring

*use-context-classloader*clj


*verbose-defrecords*clj


*warn-on-reflection*clj

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

Defaults to false.

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

Defaults to false.
raw docstring

+clj

(+)
(+ x)
(+ x y)
(+ x y & more)

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

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

+'clj

(+')
(+' x)
(+' x y)
(+' x y & more)

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

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

-clj

(- x)
(- x y)
(- x y & more)

If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Does not auto-promote longs, will throw on overflow. See also: -'

If no ys are supplied, returns the negation of x, else subtracts
the ys from x and returns the result. Does not auto-promote
longs, will throw on overflow. See also: -'
raw docstring

-'clj

(-' x)
(-' x y)
(-' x y & more)

If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result. Supports arbitrary precision. See also: -

If no ys are supplied, returns the negation of x, else subtracts
the ys from x and returns the result. Supports arbitrary precision.
See also: -
raw docstring

->cljmacro

(-> x & forms)

Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc.

Threads the expr through the forms. Inserts x as the
second item in the first form, making a list of it if it is not a
list already. If there are more forms, inserts the first form as the
second item in second form, etc.
raw docstring

->>cljmacro

(->> x & forms)

Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc.

Threads the expr through the forms. Inserts x as the
last item in the first form, making a list of it if it is not a
list already. If there are more forms, inserts the first form as the
last item in second form, etc.
raw docstring

-cache-protocol-fnclj

(-cache-protocol-fn pf x c interf)

-reset-methodsclj

(-reset-methods protocol)

..cljmacro

(.. x form)
(.. x form & more)

form => fieldName-symbol or (instanceMethodName-symbol args*)

Expands into a member access (.) of the first member on the first argument, followed by the next member on the result, etc. For instance:

(.. System (getProperties) (get "os.name"))

expands to:

(. (. System (getProperties)) (get "os.name"))

but is easier to write, read, and understand.

form => fieldName-symbol or (instanceMethodName-symbol args*)

Expands into a member access (.) of the first member on the first
argument, followed by the next member on the result, etc. For
instance:

(.. System (getProperties) (get "os.name"))

expands to:

(. (. System (getProperties)) (get "os.name"))

but is easier to write, read, and understand.
raw docstring

/clj

(/ x)
(/ x y)
(/ x y & more)

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

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

<clj

(< x)
(< x y)
(< x y & more)

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

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

<=clj

(<= x)
(<= x y)
(<= x y & more)

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

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

=clj

(= x)
(= x y)
(= x y & more)

Equality. Returns true if x equals y, false if not. Same as Java x.equals(y) except it also works for nil, and compares numbers and collections in a type-independent manner. Clojure's immutable data structures define equals() (and thus =) as a value, not an identity, comparison.

Equality. Returns true if x equals y, false if not. Same as
Java x.equals(y) except it also works for nil, and compares
numbers and collections in a type-independent manner.  Clojure's immutable data
structures define equals() (and thus =) as a value, not an identity,
comparison.
raw docstring

==clj

(== x)
(== x y)
(== x y & more)

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

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

>clj

(> x)
(> x y)
(> x y & more)

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

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

>=clj

(>= x)
(>= x y)
(>= x y & more)

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

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

accessorclj

(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. The returned function should be (slightly) more efficient than using get, but such use of accessors should be limited to known performance-critical areas.

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. The
returned function should be (slightly) more efficient than using
get, but such use of accessors should be limited to known
performance-critical areas.
raw docstring

acloneclj

(aclone array)

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

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

add-classpathcljdeprecated

(add-classpath url)

DEPRECATED

Adds the url (String or URL object) to the classpath per URLClassLoader.addURL

DEPRECATED 

Adds the url (String or URL object) to the classpath per
URLClassLoader.addURL
raw docstring

add-watchclj

(add-watch reference key fn)

Adds a watch function to an agent/atom/var/ref reference. The watch fn must be a fn of 4 args: a key, the reference, its old-state, its new-state. Whenever the reference's state might have been changed, any registered watches will have their functions called. The watch fn will be called synchronously, on the agent's thread if an agent, before any pending sends if agent or ref. Note that an atom's or ref's state may have changed again prior to the fn call, so use old/new-state rather than derefing the reference. Note also that watch fns may be called from multiple threads simultaneously. Var watchers are triggered only by root binding changes, not thread-local set!s. Keys must be unique per reference, and can be used to remove the watch with remove-watch, but are otherwise considered opaque by the watch mechanism.

Adds a watch function to an agent/atom/var/ref reference. The watch
fn must be a fn of 4 args: a key, the reference, its old-state, its
new-state. Whenever the reference's state might have been changed,
any registered watches will have their functions called. The watch fn
will be called synchronously, on the agent's thread if an agent,
before any pending sends if agent or ref. Note that an atom's or
ref's state may have changed again prior to the fn call, so use
old/new-state rather than derefing the reference. Note also that watch
fns may be called from multiple threads simultaneously. Var watchers
are triggered only by root binding changes, not thread-local
set!s. Keys must be unique per reference, and can be used to remove
the watch with remove-watch, but are otherwise considered opaque by
the watch mechanism.
raw docstring

agentclj

(agent state & options)

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

:meta metadata-map

:validator validate-fn

:error-handler handler-fn

:error-mode mode-keyword

If metadata-map is supplied, it will become the metadata on the agent. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception. handler-fn is called if an action 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 (the default if no error-handler is given) -- see set-error-mode! for details.

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

:meta metadata-map

:validator validate-fn

:error-handler handler-fn

:error-mode mode-keyword

If metadata-map is supplied, it will become the metadata on the
agent. validate-fn must be nil or a side-effect-free fn of one
argument, which will be passed the intended new state on any state
change. If the new state is unacceptable, the validate-fn should
return false or throw an exception.  handler-fn is called if an
action 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 (the
default if no error-handler is given) -- see set-error-mode! for
details.
raw docstring

agent-errorclj

(agent-error a)

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

Returns the exception thrown during an asynchronous action of the
agent if the agent is failed.  Returns nil if the agent is not
failed.
raw docstring

agent-errorscljdeprecated

(agent-errors a)

DEPRECATED: Use 'agent-error' instead. Returns a sequence of the exceptions thrown during asynchronous actions of the agent.

DEPRECATED: Use 'agent-error' instead.
Returns a sequence of the exceptions thrown during asynchronous
actions of the agent.
raw docstring

agetclj

(aget array idx)
(aget array idx & idxs)

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

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

alengthclj

(alength array)

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

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

aliasclj

(alias alias namespace-sym)

Add an alias in the current namespace to another namespace. Arguments are two symbols: the alias to be used, and the symbolic name of the target namespace. Use :as in the ns macro in preference to calling this directly.

Add an alias in the current namespace to another
namespace. Arguments are two symbols: the alias to be used, and
the symbolic name of the target namespace. Use :as in the ns macro in preference
to calling this directly.
raw docstring

all-nsclj

(all-ns)

Returns a sequence of all namespaces.

Returns a sequence of all namespaces.
raw docstring

alterclj

(alter ref fun & args)

Must be called in a transaction. Sets the in-transaction-value of ref to:

(apply fun in-transaction-value-of-ref args)

and returns the in-transaction-value of ref.

Must be called in a transaction. Sets the in-transaction-value of
ref to:

(apply fun in-transaction-value-of-ref args)

and returns the in-transaction-value of ref.
raw docstring

alter-meta!clj

(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

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
raw docstring

alter-var-rootclj

(alter-var-root v f & args)

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

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

amapcljmacro

(amap a idx ret expr)

Maps an expression across an array a, using an index named idx, and return value named ret, initialized to a clone of a, then setting each element of ret to the evaluation of expr, returning the new array ret.

Maps an expression across an array a, using an index named idx, and
return value named ret, initialized to a clone of a, then setting 
each element of ret to the evaluation of expr, returning the new 
array ret.
raw docstring

ancestorsclj

(ancestors tag)
(ancestors h tag)

Returns the immediate and indirect parents of tag, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy

Returns the immediate and indirect parents of tag, either via a Java type
inheritance relationship or a relationship established via derive. h
must be a hierarchy obtained from make-hierarchy, if not supplied
defaults to the global hierarchy
raw docstring

andcljmacro

(and)
(and x)
(and x & next)

Evaluates exprs one at a time, from left to right. If a form returns logical false (nil or false), and returns that value and doesn't evaluate any of the other expressions, otherwise it returns the value of the last expr. (and) returns true.

Evaluates exprs one at a time, from left to right. If a form
returns logical false (nil or false), and returns that value and
doesn't evaluate any of the other expressions, otherwise it returns
the value of the last expr. (and) returns true.
raw docstring

applyclj

(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.

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

areducecljmacro

(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.

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.
raw docstring

array-mapclj

(array-map)
(array-map & keyvals)

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

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

as->cljmacro

(as-> expr name & forms)

Binds name to expr, evaluates the first form in the lexical context of that binding, then binds name to that result, repeating for each successive form, returning the result of the last form.

Binds name to expr, evaluates the first form in the lexical context
of that binding, then binds name to that result, repeating for each
successive form, returning the result of the last form.
raw docstring

asetclj

(aset array idx val)
(aset array idx idx2 & idxv)

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

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

aset-booleanclj

(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.

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

aset-byteclj

(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.

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

aset-charclj

(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.

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

aset-doubleclj

(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.

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

aset-floatclj

(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.

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

aset-intclj

(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.

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

aset-longclj

(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.

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

aset-shortclj

(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.

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

assertcljmacro

(assert x)
(assert x message)

Evaluates expr and throws an exception if it does not evaluate to logical true.

Evaluates expr and throws an exception if it does not evaluate to
logical true.
raw docstring

assocclj

(assoc map key val)
(assoc map key val & kvs)

assoc[iate]. When applied to a map, returns a new map of the same (hashed/sorted) type, that contains the mapping of key(s) to val(s). When applied to a vector, returns a new vector that contains val at index. Note - index must be <= (count vector).

assoc[iate]. When applied to a map, returns a new map of the
same (hashed/sorted) type, that contains the mapping of key(s) to
val(s). When applied to a vector, returns a new vector that
contains val at index. Note - index must be <= (count vector).
raw docstring

assoc!clj

(assoc! coll key val)
(assoc! coll key val & kvs)

When applied to a transient map, adds mapping of key(s) to val(s). When applied to a transient vector, sets the val at index. Note - index must be <= (count vector). Returns coll.

When applied to a transient map, adds mapping of key(s) to
val(s). When applied to a transient vector, sets the val at index.
Note - index must be <= (count vector). Returns coll.
raw docstring

assoc-inclj

(assoc-in m [k & ks] v)

Associates a value in a nested associative structure, where ks is a sequence of keys and v is the new value and returns a new nested structure. If any levels do not exist, hash-maps will be created.

Associates a value in a nested associative structure, where ks is a
sequence of keys and v is the new value and returns a new nested structure.
If any levels do not exist, hash-maps will be created.
raw docstring

associative?clj

(associative? coll)

Returns true if coll implements Associative

Returns true if coll implements Associative
raw docstring

atomclj

(atom x)
(atom x & options)

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

:meta metadata-map

:validator validate-fn

If metadata-map is supplied, it will become the metadata on the atom. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception.

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

:meta metadata-map

:validator validate-fn

If metadata-map is supplied, it will become the metadata on the
atom. validate-fn must be nil or a side-effect-free fn of one
argument, which will be passed the intended new state on any state
change. If the new state is unacceptable, the validate-fn should
return false or throw an exception.
raw docstring

awaitclj

(await & agents)

Blocks the current thread (indefinitely!) until all actions dispatched thus far, from this thread or agent, to the agent(s) have occurred. Will block on failed agents. Will never return if a failed agent is restarted with :clear-actions true.

Blocks the current thread (indefinitely!) until all actions
dispatched thus far, from this thread or agent, to the agent(s) have
occurred.  Will block on failed agents.  Will never return if
a failed agent is restarted with :clear-actions true.
raw docstring

await-forclj

(await-for timeout-ms & agents)

Blocks the current thread until all actions dispatched thus far (from this thread or agent) to the agents have occurred, or the timeout (in milliseconds) has elapsed. Returns logical false if returning due to timeout, logical true otherwise.

Blocks the current thread until all actions dispatched thus
far (from this thread or agent) to the agents have occurred, or the
timeout (in milliseconds) has elapsed. Returns logical false if
returning due to timeout, logical true otherwise.
raw docstring

await1clj

(await1 a)

basesclj

(bases c)

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

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

beanclj

(bean x)

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

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

bigdecclj

(bigdec x)

Coerce to BigDecimal

Coerce to BigDecimal
raw docstring

bigintclj

(bigint x)

Coerce to BigInt

Coerce to BigInt
raw docstring

bigintegerclj

(biginteger x)

Coerce to BigInteger

Coerce to BigInteger
raw docstring

bindingcljmacro

(binding bindings & body)

binding => var-symbol init-expr

Creates new bindings for the (already-existing) vars, with the supplied initial values, executes the exprs in an implicit do, then re-establishes the bindings that existed before. The new bindings are made in parallel (unlike let); all init-exprs are evaluated before the vars are bound to their new values.

binding => var-symbol init-expr

Creates new bindings for the (already-existing) vars, with the
supplied initial values, executes the exprs in an implicit do, then
re-establishes the bindings that existed before.  The new bindings
are made in parallel (unlike let); all init-exprs are evaluated
before the vars are bound to their new values.
raw docstring

bit-andclj

(bit-and x y)
(bit-and x y & more)

Bitwise and

Bitwise and
raw docstring

bit-and-notclj

(bit-and-not x y)
(bit-and-not x y & more)

Bitwise and with complement

Bitwise and with complement
raw docstring

bit-clearclj

(bit-clear x n)

Clear bit at index n

Clear bit at index n
raw docstring

bit-flipclj

(bit-flip x n)

Flip bit at index n

Flip bit at index n
raw docstring

bit-notclj

(bit-not x)

Bitwise complement

Bitwise complement
raw docstring

bit-orclj

(bit-or x y)
(bit-or x y & more)

Bitwise or

Bitwise or
raw docstring

bit-setclj

(bit-set x n)

Set bit at index n

Set bit at index n
raw docstring

bit-shift-leftclj

(bit-shift-left x n)

Bitwise shift left

Bitwise shift left
raw docstring

bit-shift-rightclj

(bit-shift-right x n)

Bitwise shift right

Bitwise shift right
raw docstring

bit-testclj

(bit-test x n)

Test bit at index n

Test bit at index n
raw docstring

bit-xorclj

(bit-xor x y)
(bit-xor x y & more)

Bitwise exclusive or

Bitwise exclusive or
raw docstring

booleanclj

(boolean x)

Coerce to boolean

Coerce to boolean
raw docstring

boolean-arrayclj

(boolean-array size-or-seq)
(boolean-array size init-val-or-seq)

Creates an array of booleans

Creates an array of booleans
raw docstring

booleansclj

(booleans xs)

Casts to boolean[]

Casts to boolean[]
raw docstring

bound-fncljmacro

(bound-fn & fntail)

Returns a function defined by the given fntail, which will install the same bindings in effect as in the thread at the time bound-fn was called. This may be used to define a helper function which runs on a different thread, but needs the same bindings in place.

Returns a function defined by the given fntail, which will install the
same bindings in effect as in the thread at the time bound-fn was called.
This may be used to define a helper function which runs on a different
thread, but needs the same bindings in place.
raw docstring

bound-fn*clj

(bound-fn* f)

Returns a function, which will install the same bindings in effect as in the thread at the time bound-fn* was called and then call f with any given arguments. This may be used to define a helper function which runs on a different thread, but needs the same bindings in place.

Returns a function, which will install the same bindings in effect as in
the thread at the time bound-fn* was called and then call f with any given
arguments. This may be used to define a helper function which runs on a
different thread, but needs the same bindings in place.
raw docstring

bound?clj

(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.

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.
raw docstring

butlastclj

(butlast coll)

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

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

byteclj

(byte x)

Coerce to byte

Coerce to byte
raw docstring

byte-arrayclj

(byte-array size-or-seq)
(byte-array size init-val-or-seq)

Creates an array of bytes

Creates an array of bytes
raw docstring

bytesclj

(bytes xs)

Casts to bytes[]

Casts to bytes[]
raw docstring

casecljmacro

(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-expr

The test-constants are not evaluated. They must be compile-time literals, and need not be quoted. If the expression is equal to a test-constant, the corresponding result-expr is returned. A single default expression can follow the clauses, and its value will be returned if no clause matches. If no default expression is provided and no clause matches, an IllegalArgumentException is thrown.

Unlike cond and condp, case does a constant-time dispatch, the clauses are not considered sequentially. All manner of constant expressions are acceptable in case, including numbers, strings, symbols, keywords, and (Clojure) composites thereof. Note that since lists are used to group multiple constants that map to the same expression, a vector can be used to match a list if needed. The test-constants need not be all of the same type.

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-expr

The test-constants are not evaluated. They must be compile-time
literals, and need not be quoted.  If the expression is equal to a
test-constant, the corresponding result-expr is returned. A single
default expression can follow the clauses, and its value will be
returned if no clause matches. If no default expression is provided
and no clause matches, an IllegalArgumentException is thrown.

Unlike cond and condp, case does a constant-time dispatch, the
clauses are not considered sequentially.  All manner of constant
expressions are acceptable in case, including numbers, strings,
symbols, keywords, and (Clojure) composites thereof. Note that since
lists are used to group multiple constants that map to the same
expression, a vector can be used to match a list if needed. The
test-constants need not be all of the same type.
raw docstring

castclj

(cast c x)

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

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

catclj

(cat rf)

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

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

charclj

(char x)

Coerce to char

Coerce to char
raw docstring

char-arrayclj

(char-array size-or-seq)
(char-array size init-val-or-seq)

Creates an array of chars

Creates an array of chars
raw docstring

char-escape-stringclj

Returns escape string for char or nil if none

Returns escape string for char or nil if none
raw docstring

char-name-stringclj

Returns name string for char or nil if none

Returns name string for char or nil if none
raw docstring

char?clj

(char? x)

Return true if x is a Character

Return true if x is a Character
raw docstring

charsclj

(chars xs)

Casts to chars[]

Casts to chars[]
raw docstring

chunkclj

(chunk b)

chunk-appendclj

(chunk-append b x)

chunk-bufferclj

(chunk-buffer capacity)

chunk-consclj

(chunk-cons chunk rest)

chunk-firstclj

(chunk-first s)

chunk-nextclj

(chunk-next s)

chunk-restclj

(chunk-rest s)

chunked-seq?clj

(chunked-seq? s)

classclj

(class x)

Returns the Class of x

Returns the Class of x
raw docstring

class?clj

(class? x)

Returns true if x is an instance of Class

Returns true if x is an instance of Class
raw docstring

clear-agent-errorscljdeprecated

(clear-agent-errors a)

DEPRECATED: Use 'restart-agent' instead. Clears any exceptions thrown during asynchronous actions of the agent, allowing subsequent actions to occur.

DEPRECATED: Use 'restart-agent' instead.
Clears any exceptions thrown during asynchronous actions of the
agent, allowing subsequent actions to occur.
raw docstring

clojure-versionclj

(clojure-version)

Returns clojure version as a printable string.

Returns clojure version as a printable string.
raw docstring

coll?clj

(coll? x)

Returns true if x implements IPersistentCollection

Returns true if x implements IPersistentCollection
raw docstring

commentcljmacro

(comment & body)

Ignores body, yields nil

Ignores body, yields nil
raw docstring

commuteclj

(commute ref fun & args)

Must be called in a transaction. Sets the in-transaction-value of ref 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 accept last-one-in-wins behavior. commute allows for more concurrency than ref-set.

Must be called in a transaction. Sets the in-transaction-value of
ref 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 accept
last-one-in-wins behavior.  commute allows for more concurrency than
ref-set.
raw docstring

compclj

(comp)
(comp f)
(comp f g)
(comp f g & fs)

Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable number of args, applies the rightmost of fns to the args, the next fn (right-to-left) to the result, etc.

Takes a set of functions and returns a fn that is the composition
of those fns.  The returned fn takes a variable number of args,
applies the rightmost of fns to the args, the next
fn (right-to-left) to the result, etc.
raw docstring

comparatorclj

(comparator pred)

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

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

compareclj

(compare x y)

Comparator. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'greater than' y. Same as Java x.compareTo(y) except it also works for nil, and compares numbers and collections in a type-independent manner. x must implement Comparable

Comparator. Returns a negative number, zero, or a positive number
when x is logically 'less than', 'equal to', or 'greater than'
y. Same as Java x.compareTo(y) except it also works for nil, and
compares numbers and collections in a type-independent manner. x
must implement Comparable
raw docstring

compare-and-set!clj

(compare-and-set! atom oldval newval)

Atomically sets the value of atom to newval if and only if the current value of the atom is identical to oldval. Returns true if set happened, else false

Atomically sets the value of atom to newval if and only if the
current value of the atom is identical to oldval. Returns true if
set happened, else false
raw docstring

compileclj

(compile lib)

Compiles the namespace named by the symbol lib into a set of classfiles. The source for the lib must be in a proper classpath-relative directory. The output files will go into the directory specified by compile-path, and that directory too must be in the classpath.

Compiles the namespace named by the symbol lib into a set of
classfiles. The source for the lib must be in a proper
classpath-relative directory. The output files will go into the
directory specified by *compile-path*, and that directory too must
be in the classpath.
raw docstring

complementclj

(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.

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.
raw docstring

completingclj

(completing f)
(completing f cf)

Takes a reducing function f of 2 args and returns a fn suitable for transduce by adding an arity-1 signature that calls cf (default - identity) on the result argument.

Takes a reducing function f of 2 args and returns a fn suitable for
transduce by adding an arity-1 signature that calls cf (default -
identity) on the result argument.
raw docstring

concatclj

(concat)
(concat x)
(concat x y)
(concat x y & zs)

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

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

condcljmacro

(cond & clauses)

Takes a set of test/expr pairs. It evaluates each test one at a time. If a test returns logical true, cond evaluates and returns the value of the corresponding expr and doesn't evaluate any of the other tests or exprs. (cond) returns nil.

Takes a set of test/expr pairs. It evaluates each test one at a
time.  If a test returns logical true, cond evaluates and returns
the value of the corresponding expr and doesn't evaluate any of the
other tests or exprs. (cond) returns nil.
raw docstring

cond->cljmacro

(cond-> expr & clauses)

Takes an expression and a set of test/form pairs. Threads expr (via ->) through each form for which the corresponding test expression is true. Note that, unlike cond branching, cond-> threading does not short circuit after the first true test expression.

Takes an expression and a set of test/form pairs. Threads expr (via ->)
through each form for which the corresponding test
expression is true. Note that, unlike cond branching, cond-> threading does
not short circuit after the first true test expression.
raw docstring

cond->>cljmacro

(cond->> expr & clauses)

Takes an expression and a set of test/form pairs. Threads expr (via ->>) through each form for which the corresponding test expression is true. Note that, unlike cond branching, cond->> threading does not short circuit after the first true test expression.

Takes an expression and a set of test/form pairs. Threads expr (via ->>)
through each form for which the corresponding test expression
is true.  Note that, unlike cond branching, cond->> threading does not short circuit
after the first true test expression.
raw docstring

condpcljmacro

(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-expr

test-expr :>> result-fn

Note :>> is an ordinary keyword.

For each clause, (pred test-expr expr) is evaluated. If it returns logical true, the clause is a match. If a binary clause matches, the result-expr is returned, if a ternary clause matches, its result-fn, which must be a unary function, is called with the result of the predicate as its argument, the result of that call being the return value of condp. A single default expression can follow the clauses, and its value will be returned if no clause matches. If no default expression is provided and no clause matches, an IllegalArgumentException is thrown.

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

test-expr result-expr

test-expr :>> result-fn

Note :>> is an ordinary keyword.

For each clause, (pred test-expr expr) is evaluated. If it returns
logical true, the clause is a match. If a binary clause matches, the
result-expr is returned, if a ternary clause matches, its result-fn,
which must be a unary function, is called with the result of the
predicate as its argument, the result of that call being the return
value of condp. A single default expression can follow the clauses,
and its value will be returned if no clause matches. If no default
expression is provided and no clause matches, an
IllegalArgumentException is thrown.
raw docstring

conjclj

(conj coll x)
(conj coll x & xs)

conj[oin]. Returns a new collection with the xs 'added'. (conj nil item) returns (item). The 'addition' may happen at different 'places' depending on the concrete type.

conj[oin]. Returns a new collection with the xs
'added'. (conj nil item) returns (item).  The 'addition' may
happen at different 'places' depending on the concrete type.
raw docstring

conj!clj

(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.

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

consclj

(cons x seq)

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

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

constantlyclj

(constantly x)

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

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

construct-proxyclj

(construct-proxy c & ctor-args)

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

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

contains?clj

(contains? coll key)

Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed collections like vectors and Java arrays, this tests if the numeric key is within the range of indexes. 'contains?' operates constant or logarithmic time; it will not perform a linear search for a value. See also 'some'.

Returns true if key is present in the given collection, otherwise
returns false.  Note that for numerically indexed collections like
vectors and Java arrays, this tests if the numeric key is within the
range of indexes. 'contains?' operates constant or logarithmic time;
it will not perform a linear search for a value.  See also 'some'.
raw docstring

countclj

(count coll)

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

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

counted?clj

(counted? coll)

Returns true if coll implements count in constant time

Returns true if coll implements count in constant time
raw docstring

create-nsclj

(create-ns sym)

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

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

create-structclj

(create-struct & keys)

Returns a structure basis object.

Returns a structure basis object.
raw docstring

cycleclj

(cycle coll)

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

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

decclj

(dec x)

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

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

dec'clj

(dec' x)

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

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

decimal?clj

(decimal? n)

Returns true if n is a BigDecimal

Returns true if n is a BigDecimal
raw docstring

declarecljmacro

(declare & names)

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

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

dedupeclj

(dedupe)
(dedupe coll)

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

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

default-data-readersclj

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

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

definlinecljmacro

(definline name & decl)

Experimental - like defmacro, except defines a named function whose body is the expansion, calls to which may be expanded inline as if it were a macro. Cannot be used with variadic (&) args.

Experimental - like defmacro, except defines a named function whose
body is the expansion, calls to which may be expanded inline as if
it were a macro. Cannot be used with variadic (&) args.
raw docstring

definterfacecljmacro

(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]))

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]))
raw docstring

defmacrocljmacro

(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 a macro and will be used as a macro by the compiler when it is called.

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

defmethodcljmacro

(defmethod multifn dispatch-val & fn-tail)

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

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

defmulticljmacro

(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:

:default

The default dispatch value, defaults to :default

:hierarchy

The value used for hierarchical dispatch (e.g. ::square is-a ::shape)

Hierarchies are type-like relationships that do not depend upon type inheritance. By default Clojure's multimethods dispatch off of a global hierarchy map. However, a hierarchy relationship can be created with the derive function used to augment the root ancestor created with make-hierarchy.

Multimethods expect the value of the hierarchy option to be supplied as a reference type e.g. a var (i.e. via the Var-quote dispatch macro #' or the var special form).

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:

:default

The default dispatch value, defaults to :default

:hierarchy

The value used for hierarchical dispatch (e.g. ::square is-a ::shape)

Hierarchies are type-like relationships that do not depend upon type
inheritance. By default Clojure's multimethods dispatch off of a
global hierarchy map.  However, a hierarchy relationship can be
created with the derive function used to augment the root ancestor
created with make-hierarchy.

Multimethods expect the value of the hierarchy option to be supplied as
a reference type e.g. a var (i.e. via the Var-quote dispatch macro #'
or the var special form).
raw docstring

defncljmacro

(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 (def name (fn ([params* ] exprs*)+)) with any doc-string or attrs added to the var metadata. prepost-map defines a map with optional keys :pre and :post that contain collections of pre or post conditions.

Same as (def name (fn [params* ] exprs*)) or (def
name (fn ([params* ] exprs*)+)) with any doc-string or attrs added
to the var metadata. prepost-map defines a map with optional keys
:pre and :post that contain collections of pre or post conditions.
raw docstring

defn-cljmacro

(defn- name & decls)

same as defn, yielding non-public def

same as defn, yielding non-public def
raw docstring

defoncecljmacro

(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

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

defprotocolcljmacro

(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"

;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 the protocol overall and for each method. The above yields a set of polymorphic functions and a protocol object. All are namespace-qualified by the ns enclosing the definition The resulting functions dispatch on the type of their first argument, which is required 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.

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 will have methods corresponding to the protocol functions, and the protocol will automatically work with instances of the interface.

Note that you should not use this interface with deftype or reify, 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

A protocol is a named set of named methods and their signatures:
(defprotocol AProtocolName

  ;optional doc string
  "A doc string for AProtocol abstraction"

;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 the
protocol overall and for each method. The above yields a set of
polymorphic functions and a protocol object. All are
namespace-qualified by the ns enclosing the definition The resulting
functions dispatch on the type of their first argument, which is
required 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.

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 will
have methods corresponding to the protocol functions, and the
protocol will automatically work with instances of the interface.

Note that you should not use this interface with deftype or
reify, 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
raw docstring

defrecordcljmacro

(defrecord name [& fields] & opts+specs)

(defrecord name [fields*] options* specs*)

Currently there are no options.

Each spec consists of a protocol or interface name followed by zero or more method bodies:

protocol-or-interface-or-Object (methodName [args*] body)*

Dynamically generates compiled bytecode for class with the given name, in a package with the same name as the current namespace, the given fields, and, optionally, methods for protocols and/or interfaces.

The class will have the (immutable) fields named by fields, which can have type hints. Protocols/interfaces and methods are optional. The only methods that can be supplied are those declared in the protocols/interfaces. Note that method bodies are not 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 and methodname symbols. If not supplied, they will be inferred, so type hints should be reserved for disambiguation.

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 a 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.

In the method bodies, the (unqualified) name can be used to name the class (for calls to new, instance? etc).

The class will have implementations of several (clojure.lang) interfaces generated automatically: IObj (metadata support) and IPersistentMap, and all of their superinterfaces.

In addition, defrecord will define type-and-value-based =, and will defined Java .hashCode and .equals consistent with the contract for java.util.Map.

When AOT compiling, generates compiled bytecode for a class with the given name (a symbol), prepends the current ns as the package, and writes the .class file to the compile-path directory.

Two constructors will be defined, one taking the designated fields followed by a metadata map (nil for none) and an extension field map (nil for none), and one taking only the fields (using nil for meta and extension fields). Note that the field names __meta and __extmap are currently reserved and should not be used when defining your own records.

Given (defrecord TypeName ...), two factory functions will be defined: ->TypeName, taking positional parameters for the fields, and map->TypeName, taking a map of keywords to field values.

(defrecord name [fields*]  options* specs*)

Currently there are no options.

Each spec consists of a protocol or interface name followed by zero
or more method bodies:

protocol-or-interface-or-Object
(methodName [args*] body)*

Dynamically generates compiled bytecode for class with the given
name, in a package with the same name as the current namespace, the
given fields, and, optionally, methods for protocols and/or
interfaces.

The class will have the (immutable) fields named by
fields, which can have type hints. Protocols/interfaces and methods
are optional. The only methods that can be supplied are those
declared in the protocols/interfaces.  Note that method bodies are
not 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 and
methodname symbols. If not supplied, they will be inferred, so type
hints should be reserved for disambiguation.

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 a 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.

In the method bodies, the (unqualified) name can be used to name the
class (for calls to new, instance? etc).

The class will have implementations of several (clojure.lang)
interfaces generated automatically: IObj (metadata support) and
IPersistentMap, and all of their superinterfaces.

In addition, defrecord will define type-and-value-based =,
and will defined Java .hashCode and .equals consistent with the
contract for java.util.Map.

When AOT compiling, generates compiled bytecode for a class with the
given name (a symbol), prepends the current ns as the package, and
writes the .class file to the *compile-path* directory.

Two constructors will be defined, one taking the designated fields
followed by a metadata map (nil for none) and an extension field
map (nil for none), and one taking only the fields (using nil for
meta and extension fields). Note that the field names __meta
and __extmap are currently reserved and should not be used when
defining your own records.

Given (defrecord TypeName ...), two factory functions will be
defined: ->TypeName, taking positional parameters for the fields,
and map->TypeName, taking a map of keywords to field values.
raw docstring

defstructcljmacro

(defstruct name & keys)

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

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

deftypecljmacro

(deftype name [& fields] & opts+specs)

(deftype name [fields*] options* specs*)

Currently there are no options.

Each spec consists of a protocol or interface name followed by zero or more method bodies:

protocol-or-interface-or-Object (methodName [args*] body)*

Dynamically generates compiled bytecode for class with the given name, in a package with the same name as the current namespace, the given fields, and, optionally, methods for protocols and/or interfaces.

The class will have the (by default, immutable) fields named by fields, which can have type hints. Protocols/interfaces and methods are optional. The only methods that can be supplied are those declared in the protocols/interfaces. Note that method bodies are not closures, the local environment includes only the named fields, and those fields can be accessed directly. Fields can be qualified with the metadata :volatile-mutable true or :unsynchronized-mutable true, at which point (set! afield aval) will be supported in method bodies. Note well that mutable fields are extremely difficult to use correctly, and are present only to facilitate the building of higher level constructs, such as Clojure's reference types, in Clojure itself. They are for experts only - if the semantics and implications of :volatile-mutable or :unsynchronized-mutable are not immediately 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 and methodname symbols. If not supplied, they will be inferred, so type hints should be reserved for disambiguation.

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 a 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.

In the method bodies, the (unqualified) name can be used to name the class (for calls to new, instance? etc).

When AOT compiling, generates compiled bytecode for a class with the given name (a symbol), prepends the current ns as the package, and writes the .class file to the compile-path directory.

One constructor will be defined, taking the designated fields. Note that the field names __meta and __extmap are currently reserved and should not be used when defining your own types.

Given (deftype TypeName ...), a factory function called ->TypeName will be defined, taking positional parameters for the fields

(deftype name [fields*]  options* specs*)

Currently there are no options.

Each spec consists of a protocol or interface name followed by zero
or more method bodies:

protocol-or-interface-or-Object
(methodName [args*] body)*

Dynamically generates compiled bytecode for class with the given
name, in a package with the same name as the current namespace, the
given fields, and, optionally, methods for protocols and/or
interfaces. 

The class will have the (by default, immutable) fields named by
fields, which can have type hints. Protocols/interfaces and methods
are optional. The only methods that can be supplied are those
declared in the protocols/interfaces.  Note that method bodies are
not closures, the local environment includes only the named fields,
and those fields can be accessed directly. Fields can be qualified
with the metadata :volatile-mutable true or :unsynchronized-mutable
true, at which point (set! afield aval) will be supported in method
bodies. Note well that mutable fields are extremely difficult to use
correctly, and are present only to facilitate the building of higher
level constructs, such as Clojure's reference types, in Clojure
itself. They are for experts only - if the semantics and
implications of :volatile-mutable or :unsynchronized-mutable are not
immediately 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 and
methodname symbols. If not supplied, they will be inferred, so type
hints should be reserved for disambiguation.

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 a 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.

In the method bodies, the (unqualified) name can be used to name the
class (for calls to new, instance? etc).

When AOT compiling, generates compiled bytecode for a class with the
given name (a symbol), prepends the current ns as the package, and
writes the .class file to the *compile-path* directory.

One constructor will be defined, taking the designated fields.  Note
that the field names __meta and __extmap are currently reserved and
should not be used when defining your own types.

Given (deftype TypeName ...), a factory function called ->TypeName
will be defined, taking positional parameters for the fields
raw docstring

delaycljmacro

(delay & body)

Takes a body of expressions and yields a Delay object that will invoke the body only the first time it is forced (with force or deref/@), and will cache the result and return it on all subsequent force calls. See also - realized?

Takes a body of expressions and yields a Delay object that will
invoke the body only the first time it is forced (with force or deref/@), and
will cache the result and return it on all subsequent force
calls. See also - realized?
raw docstring

delay?clj

(delay? x)

returns true if x is a Delay created with delay

returns true if x is a Delay created with delay
raw docstring

deliverclj

(deliver promise val)

Delivers the supplied value to the promise, releasing any pending derefs. A subsequent call to deliver on a promise will have no effect.

Delivers the supplied value to the promise, releasing any pending
derefs. A subsequent call to deliver on a promise will have no effect.
raw docstring

denominatorclj

(denominator r)

Returns the denominator part of a Ratio.

Returns the denominator part of a Ratio.
raw docstring

derefclj

(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 the most-recently-committed value of ref. When applied to a var, agent or atom, returns its current state. When applied to a delay, forces it if not already forced. When applied to a future, will block if computation not complete. When applied to a promise, will block until a value is delivered. The variant taking a timeout can be used for blocking references (futures and promises), and will return timeout-val if the timeout (in milliseconds) is reached before a value is available. See also - realized?.

Also reader macro: @ref/@agent/@var/@atom/@delay/@future/@promise. Within a transaction,
returns the in-transaction-value of ref, else returns the
most-recently-committed value of ref. When applied to a var, agent
or atom, returns its current state. When applied to a delay, forces
it if not already forced. When applied to a future, will block if
computation not complete. When applied to a promise, will block
until a value is delivered.  The variant taking a timeout can be
used for blocking references (futures and promises), and will return
timeout-val if the timeout (in milliseconds) is reached before a
value is available. See also - realized?.
raw docstring

deriveclj

(derive tag parent)
(derive h tag parent)

Establishes a parent/child relationship between parent and tag. Parent must be a namespace-qualified symbol or keyword and child can be either a namespace-qualified symbol or keyword or a class. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to, and modifies, the global hierarchy.

Establishes a parent/child relationship between parent and
tag. Parent must be a namespace-qualified symbol or keyword and
child can be either a namespace-qualified symbol or keyword or a
class. h must be a hierarchy obtained from make-hierarchy, if not
supplied defaults to, and modifies, the global hierarchy.
raw docstring

descendantsclj

(descendants tag)
(descendants h tag)

Returns the immediate and indirect children of tag, through a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy. Note: does not work on Java type inheritance relationships.

Returns the immediate and indirect children of tag, through a
relationship established via derive. h must be a hierarchy obtained
from make-hierarchy, if not supplied defaults to the global
hierarchy. Note: does not work on Java type inheritance
relationships.
raw docstring

destructureclj

(destructure bindings)

disjclj

(disj set)
(disj set key)
(disj set key & ks)

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

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

disj!clj

(disj! set)
(disj! set key)
(disj! set key & ks)

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

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

dissocclj

(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).

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

dissoc!clj

(dissoc! map key)
(dissoc! map key & ks)

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

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

distinctclj

(distinct)
(distinct coll)

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

Returns a lazy sequence of the elements of coll with duplicates removed.
Returns a stateful transducer when no collection is provided.
raw docstring

distinct?clj

(distinct? x)
(distinct? x y)
(distinct? x y & more)

Returns true if no two of the arguments are =

Returns true if no two of the arguments are =
raw docstring

doallclj

(doall coll)
(doall n coll)

When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. doall can be used to force any effects. Walks through the successive nexts of the seq, retains the head and returns it, thus causing the entire seq to reside in memory at one time.

When lazy sequences are produced via functions that have side
effects, any effects other than those needed to produce the first
element in the seq do not occur until the seq is consumed. doall can
be used to force any effects. Walks through the successive nexts of
the seq, retains the head and returns it, thus causing the entire
seq to reside in memory at one time.
raw docstring

dorunclj

(dorun coll)
(dorun n coll)

When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. dorun can be used to force any effects. Walks through the successive nexts of the seq, does not retain the head and returns nil.

When lazy sequences are produced via functions that have side
effects, any effects other than those needed to produce the first
element in the seq do not occur until the seq is consumed. dorun can
be used to force any effects. Walks through the successive nexts of
the seq, does not retain the head and returns nil.
raw docstring

doseqcljmacro

(doseq seq-exprs & body)

Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by "for". Does not retain the head of the sequence. Returns nil.

Repeatedly executes body (presumably for side-effects) with
bindings and filtering as provided by "for".  Does not retain
the head of the sequence. Returns nil.
raw docstring

dosynccljmacro

(dosync & exprs)

Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls. Starts a transaction if none is already running on this thread. Any uncaught exception will abort the transaction and flow out of dosync. The exprs may be run more than once, but any effects on Refs will be atomic.

Runs the exprs (in an implicit do) in a transaction that encompasses
exprs and any nested calls.  Starts a transaction if none is already
running on this thread. Any uncaught exception will abort the
transaction and flow out of dosync. The exprs may be run more than
once, but any effects on Refs will be atomic.
raw docstring

dotimescljmacro

(dotimes bindings & body)

bindings => name n

Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-1.

bindings => name n

Repeatedly executes body (presumably for side-effects) with name
bound to integers from 0 through n-1.
raw docstring

dotocljmacro

(doto x & forms)

Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments. The forms are evaluated in order. Returns x.

(doto (new java.util.HashMap) (.put "a" 1) (.put "b" 2))

Evaluates x then calls all of the methods and functions with the
value of x supplied at the front of the given arguments.  The forms
are evaluated in order.  Returns x.

(doto (new java.util.HashMap) (.put "a" 1) (.put "b" 2))
raw docstring

doubleclj

(double x)

Coerce to double

Coerce to double
raw docstring

double-arrayclj

(double-array size-or-seq)
(double-array size init-val-or-seq)

Creates an array of doubles

Creates an array of doubles
raw docstring

doublesclj

(doubles xs)

Casts to double[]

Casts to double[]
raw docstring

dropclj

(drop n)
(drop n coll)

Returns a lazy sequence of all but the first n items in coll. Returns a stateful transducer when no collection is provided.

Returns a lazy sequence of all but the first n items in coll.
Returns a stateful transducer when no collection is provided.
raw docstring

drop-lastclj

(drop-last s)
(drop-last n s)

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

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

drop-whileclj

(drop-while pred)
(drop-while pred coll)

Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical false. Returns a stateful transducer when no collection is provided.

Returns a lazy sequence of the items in coll starting from the
first item for which (pred item) returns logical false.  Returns a
stateful transducer when no collection is provided.
raw docstring

eductionclj

(eduction xform* coll)

Returns a reducible/iterable application of the transducers to the items in coll. Transducers are applied in order as if combined with comp. Note that these applications will be performed every time reduce/iterator is called.

Returns a reducible/iterable application of the transducers
to the items in coll. Transducers are applied in order as if
combined with comp. Note that these applications will be
performed every time reduce/iterator is called.
raw docstring

emptyclj

(empty coll)

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

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

EMPTY-NODEclj


empty?clj

(empty? coll)

Returns true if coll has no items - same as (not (seq coll)). Please use the idiom (seq x) rather than (not (empty? x))

Returns true if coll has no items - same as (not (seq coll)).
Please use the idiom (seq x) rather than (not (empty? x))
raw docstring

ensureclj

(ensure ref)

Must be called in a transaction. Protects the ref from modification by other transactions. Returns the in-transaction-value of ref. Allows for more concurrency than (ref-set ref @ref)

Must be called in a transaction. Protects the ref from modification
by other transactions.  Returns the in-transaction-value of
ref. Allows for more concurrency than (ref-set ref @ref)
raw docstring

ensure-reducedclj

(ensure-reduced x)

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

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

enumeration-seqclj

(enumeration-seq e)

Returns a seq on a java.util.Enumeration

Returns a seq on a java.util.Enumeration
raw docstring

error-handlerclj

(error-handler a)

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

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

error-modeclj

(error-mode a)

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

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

evalclj

(eval form)

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

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

even?clj

(even? n)

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

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

every-predclj

(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 its composing predicates return a logical true value against all of its arguments, else it returns false. Note that f is short-circuiting in that it will stop execution on the first argument that triggers a logical false result against the original predicates.

Takes a set of predicates and returns a function f that returns true if all of its
composing predicates return a logical true value against all of its arguments, else it returns
false. Note that f is short-circuiting in that it will stop execution on the first
argument that triggers a logical false result against the original predicates.
raw docstring

every?clj

(every? pred coll)

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

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

ex-dataclj

(ex-data ex)

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

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

ex-infoclj

(ex-info msg map)
(ex-info msg map cause)

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

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

extendclj

(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

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
raw docstring

extend-protocolcljmacro

(extend-protocol p & specs)

Useful when you want to provide several implementations of the same protocol all at once. Takes a single protocol and the implementation of that protocol for one or more types. Expands into calls to extend-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] ...)))

Useful when you want to provide several implementations of the same
protocol all at once. Takes a single protocol and the implementation
of that protocol for one or more types. Expands into calls to
extend-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] ...)))
raw docstring

extend-typecljmacro

(extend-type t & specs)

A macro that expands into an extend call. Useful when you are supplying the definitions explicitly inline, extend-type automatically creates the maps required by extend. Propagates the class 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] ...)})

A macro that expands into an extend call. Useful when you are
supplying the definitions explicitly inline, extend-type
automatically creates the maps required by extend.  Propagates the
class 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] ...)})
raw docstring

extendersclj

(extenders protocol)

Returns a collection of the types explicitly extending protocol

Returns a collection of the types explicitly extending protocol
raw docstring

extends?clj

(extends? protocol atype)

Returns true if atype extends protocol

Returns true if atype extends protocol
raw docstring

false?clj

(false? x)

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

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

ffirstclj

(ffirst x)

Same as (first (first x))

Same as (first (first x))
raw docstring

file-seqclj

(file-seq dir)

A tree seq on java.io.Files

A tree seq on java.io.Files
raw docstring

filterclj

(filter pred)
(filter pred coll)

Returns a lazy sequence of the items in coll for which (pred item) returns true. pred must be free of side-effects. Returns a transducer when no collection is provided.

Returns a lazy sequence of the items in coll for which
(pred item) returns true. pred must be free of side-effects.
Returns a transducer when no collection is provided.
raw docstring

filtervclj

(filterv pred coll)

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

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

findclj

(find map key)

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

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

find-keywordclj

(find-keyword name)
(find-keyword ns name)

Returns a Keyword with the given namespace and name if one already exists. This function will not intern a new keyword. If the keyword has not already been interned, it will return nil. Do not use : in the keyword strings, it will be added automatically.

Returns a Keyword with the given namespace and name if one already
exists.  This function will not intern a new keyword. If the keyword
has not already been interned, it will return nil.  Do not use :
in the keyword strings, it will be added automatically.
raw docstring

find-nsclj

(find-ns sym)

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

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

find-protocol-implclj

(find-protocol-impl protocol x)

find-protocol-methodclj

(find-protocol-method protocol methodk x)

find-varclj

(find-var sym)

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

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

firstclj

(first coll)

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

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

flattenclj

(flatten x)

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

Takes any nested combination of sequential things (lists, vectors,
etc.) and returns their contents as a single, flat sequence.
(flatten nil) returns an empty sequence.
raw docstring

floatclj

(float x)

Coerce to float

Coerce to float
raw docstring

float-arrayclj

(float-array size-or-seq)
(float-array size init-val-or-seq)

Creates an array of floats

Creates an array of floats
raw docstring

float?clj

(float? n)

Returns true if n is a floating point number

Returns true if n is a floating point number
raw docstring

floatsclj

(floats xs)

Casts to float[]

Casts to float[]
raw docstring

flushclj

(flush)

Flushes the output stream that is the current value of out

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

fncljmacro

(fn & sigs)

params => positional-params* , or positional-params* & next-param positional-param => binding-form next-param => binding-form name => symbol

Defines a function

params => positional-params* , or positional-params* & next-param
positional-param => binding-form
next-param => binding-form
name => symbol

Defines a function
raw docstring

fn?clj

(fn? x)

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

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

fnextclj

(fnext x)

Same as (first (next x))

Same as (first (next x))
raw docstring

fnilclj

(fnil f x)
(fnil f x y)
(fnil f x y z)

Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can take any number of arguments, not just the one(s) being nil-patched.

Takes a function f, and returns a function that calls f, replacing
a nil first argument to f with the supplied value x. Higher arity
versions can replace arguments in the second and third
positions (y, z). Note that the function f can take any number of
arguments, not just the one(s) being nil-patched.
raw docstring

forcljmacro

(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]))

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]))
raw docstring

forceclj

(force x)

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

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

formatclj

(format fmt & args)

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

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

frequenciesclj

(frequencies coll)

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

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

futurecljmacro

(future & body)

Takes a body of expressions and yields a future object that will invoke the body in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block, unless the variant of deref with timeout is used. See also - realized?.

Takes a body of expressions and yields a future object that will
invoke the body in another thread, and will cache the result and
return it on all subsequent calls to deref/@. If the computation has
not yet finished, calls to deref/@ will block, unless the variant of
deref with timeout is used. See also - realized?.
raw docstring

future-callclj

(future-call f)

Takes a function of no args and yields a future object that will invoke the function in another thread, and will cache the result and return it on all subsequent calls to deref/@. If the computation has not yet finished, calls to deref/@ will block, unless the variant of deref with timeout is used. See also - realized?.

Takes a function of no args and yields a future object that will
invoke the function in another thread, and will cache the result and
return it on all subsequent calls to deref/@. If the computation has
not yet finished, calls to deref/@ will block, unless the variant
of deref with timeout is used. See also - realized?.
raw docstring

future-cancelclj

(future-cancel f)

Cancels the future, if possible.

Cancels the future, if possible.
raw docstring

future-cancelled?clj

(future-cancelled? f)

Returns true if future f is cancelled

Returns true if future f is cancelled
raw docstring

future-done?clj

(future-done? f)

Returns true if future f is done

Returns true if future f is done
raw docstring

future?clj

(future? x)

Returns true if x is a future

Returns true if x is a future
raw docstring

gen-classcljmacro

(gen-class & options)

When compiling, generates compiled bytecode for a class with the given package-qualified :name (which, as all names in these parameters, can be a string or symbol), and writes the .class file to the compile-path directory. When not compiling, does nothing. The gen-class construct contains no implementation, as the implementation will be dynamically sought by the generated class in functions in an implementing Clojure namespace. Given a generated class org.mydomain.MyClass with a method named mymethod, gen-class will generate an implementation that looks for a function named by (str prefix mymethod) (default prefix: "-") in a Clojure 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, the static initializer for the generated class will attempt to load the Clojure support code for the class as a resource from the classpath, e.g. in the example case, org/mydomain/MyClass__init.class. This behavior can be controlled by :load-impl-ns

Note that methods with a maximum of 18 parameters are supported.

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 aclass

Specifies the superclass, the non-private methods of which will be overridden 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 name

If supplied, names a function that will be called with the arguments to the constructor. Must return [ [superclass-constructor-args] state] If not supplied, the constructor args are passed directly to the superclass constructor and the state will be nil

:constructors {[param-types] [super-param-types], ...}

By default, constructors are created for the generated class which match the signature(s) of the constructors for the superclass. This parameter may be used to explicitly specify constructors, each entry providing a mapping from a constructor signature to a superclass constructor signature. When you supply this, you must supply an :init specifier.

:post-init name

If supplied, names a function that will be called with the object as the 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-private methods of its superclasses/interfaces. This parameter can be used to specify the signatures of additional methods of the generated class. Static methods can be specified with ^{:static true} in the signature's metadata. Do not repeat superclass/interface signatures here.

:main boolean

If supplied and true, a static public main function will be generated. It will pass each string of the String[] argument as a separate argument to a function called (str prefix main).

:factory name

If supplied, a (set of) public static factory function(s) will be created with the given name, and the same signature(s) as the constructor(s).

:state name

If supplied, a public final instance field with the given name will be created. You must supply an :init function in order to provide a value for the state. Note that, though final, the state can be a ref or agent, supporting the creation of Java objects with transactional or asynchronous mutation semantics.

:exposes {protected-field-name {:get name :set name}, ...}

Since the implementations of the methods of the generated class occur in Clojure functions, they have no access to the inherited protected fields of the superclass. This parameter can be used to generate 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 an overridden method. Those methods may be exposed and referred in the new method implementation by a local name.

:prefix string

Default: "-" Methods called e.g. Foo will be looked up in vars called prefixFoo in the implementing ns.

:impl-ns name

Default: the name of the current ns. Implementations of methods will be looked up in this namespace.

:load-impl-ns boolean

Default: true. Causes the static initializer for the generated class to reference the load code for the implementing namespace. Should be true when implementing-ns is the default, false if you intend to load the code via some other method.

When compiling, generates compiled bytecode for a class with the
given package-qualified :name (which, as all names in these
parameters, can be a string or symbol), and writes the .class file
to the *compile-path* directory.  When not compiling, does
nothing. The gen-class construct contains no implementation, as the
implementation will be dynamically sought by the generated class in
functions in an implementing Clojure namespace. Given a generated
class org.mydomain.MyClass with a method named mymethod, gen-class
will generate an implementation that looks for a function named by 
(str prefix mymethod) (default prefix: "-") in a
Clojure 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, the
static initializer for the generated class will attempt to load the
Clojure support code for the class as a resource from the classpath,
e.g. in the example case, ``org/mydomain/MyClass__init.class``. This
behavior can be controlled by :load-impl-ns

Note that methods with a maximum of 18 parameters are supported.

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 aclass

Specifies the superclass, the non-private methods of which will be
overridden 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 name

If supplied, names a function that will be called with the arguments
to the constructor. Must return [ [superclass-constructor-args] state] 
If not supplied, the constructor args are passed directly to
the superclass constructor and the state will be nil

:constructors {[param-types] [super-param-types], ...}

By default, constructors are created for the generated class which
match the signature(s) of the constructors for the superclass. This
parameter may be used to explicitly specify constructors, each entry
providing a mapping from a constructor signature to a superclass
constructor signature. When you supply this, you must supply an :init
specifier. 

:post-init name

If supplied, names a function that will be called with the object as
the 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-private
methods of its superclasses/interfaces. This parameter can be used
to specify the signatures of additional methods of the generated
class. Static methods can be specified with ^{:static true} in the
signature's metadata. Do not repeat superclass/interface signatures
here.

:main boolean

If supplied and true, a static public main function will be generated. It will
pass each string of the String[] argument as a separate argument to
a function called (str prefix main).

:factory name

If supplied, a (set of) public static factory function(s) will be
created with the given name, and the same signature(s) as the
constructor(s).

:state name

If supplied, a public final instance field with the given name will be
created. You must supply an :init function in order to provide a
value for the state. Note that, though final, the state can be a ref
or agent, supporting the creation of Java objects with transactional
or asynchronous mutation semantics.

:exposes {protected-field-name {:get name :set name}, ...}

Since the implementations of the methods of the generated class
occur in Clojure functions, they have no access to the inherited
protected fields of the superclass. This parameter can be used to
generate 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 an
overridden method.  Those methods may be exposed and referred in 
the new method implementation by a local name.

:prefix string

Default: "-" Methods called e.g. Foo will be looked up in vars called
prefixFoo in the implementing ns.

:impl-ns name

Default: the name of the current ns. Implementations of methods will be 
looked up in this namespace.

:load-impl-ns boolean

Default: true. Causes the static initializer for the generated class
to reference the load code for the implementing namespace. Should be
true when implementing-ns is the default, false if you intend to
load the code via some other method.
raw docstring

gen-interfacecljmacro

(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.

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.
raw docstring

gensymclj

(gensym)
(gensym prefix-string)

Returns a new symbol with a unique name. If a prefix string is supplied, the name is prefix# where # is some unique number. If prefix is not supplied, the prefix is 'G__'.

Returns a new symbol with a unique name. If a prefix string is
supplied, the name is prefix# where # is some unique number. If
prefix is not supplied, the prefix is 'G__'.
raw docstring

getclj

(get map key)
(get map key not-found)

Returns the value mapped to key, not-found or nil if key not present.

Returns the value mapped to key, not-found or nil if key not present.
raw docstring

get-inclj

(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 key is not present, or the not-found value if supplied.

Returns the value in a nested associative structure,
where ks is a sequence of keys. Returns nil if the key
is not present, or the not-found value if supplied.
raw docstring

get-methodclj

(get-method multifn dispatch-val)

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

Given a multimethod and a dispatch value, returns the dispatch fn
that would apply to that value, or nil if none apply and no default
raw docstring

get-proxy-classclj

(get-proxy-class & bases)

Takes an optional single class followed by zero or more interfaces. If not supplied class defaults to Object. Creates an returns an instance of a proxy class derived from the supplied classes. The resulting value is cached and used for any subsequent requests for the same class set. Returns a Class object.

Takes an optional single class followed by zero or more
interfaces. If not supplied class defaults to Object.  Creates an
returns an instance of a proxy class derived from the supplied
classes. The resulting value is cached and used for any subsequent
requests for the same class set. Returns a Class object.
raw docstring

get-thread-bindingsclj

(get-thread-bindings)

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

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

get-validatorclj

(get-validator iref)

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

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

group-byclj

(group-by f coll)

Returns a map of the elements of coll keyed by the result of f on each element. The value at each key will be a vector of the corresponding elements, in the order they appeared in coll.

Returns a map of the elements of coll keyed by the result of
f on each element. The value at each key will be a vector of the
corresponding elements, in the order they appeared in coll.
raw docstring

hashclj

(hash x)

Returns the hash code of its argument. Note this is the hash code consistent with =, and thus is different than .hashCode for Integer, Short, Byte and Clojure collections.

Returns the hash code of its argument. Note this is the hash code
consistent with =, and thus is different than .hashCode for Integer,
Short, Byte and Clojure collections.
raw docstring

hash-combineclj

(hash-combine x y)

hash-mapclj

(hash-map)
(hash-map & keyvals)

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

keyval => key val
Returns a new hash map with supplied mappings.  If any keys are
equal, they are handled as if by repeated uses of assoc.
raw docstring

hash-ordered-collclj

(hash-ordered-coll coll)

Returns the hash code, consistent with =, for an external ordered collection implementing Iterable. See http://clojure.org/data_structures#hash for full algorithms.

Returns the hash code, consistent with =, for an external ordered
collection implementing Iterable.
See http://clojure.org/data_structures#hash for full algorithms.
raw docstring

hash-setclj

(hash-set)
(hash-set & keys)

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

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

hash-unordered-collclj

(hash-unordered-coll coll)

Returns the hash code, consistent with =, for an external unordered collection implementing Iterable. For maps, the iterator should return map entries whose hash is computed as (hash-ordered-coll [k v]). See http://clojure.org/data_structures#hash for full algorithms.

Returns the hash code, consistent with =, for an external unordered
collection implementing Iterable. For maps, the iterator should
return map entries whose hash is computed as
  (hash-ordered-coll [k v]).
See http://clojure.org/data_structures#hash for full algorithms.
raw docstring

identical?clj

(identical? x y)

Tests if 2 arguments are the same object

Tests if 2 arguments are the same object
raw docstring

identityclj

(identity x)

Returns its argument.

Returns its argument.
raw docstring

if-letcljmacro

(if-let bindings then)
(if-let bindings then else & oldform)

bindings => binding-form test

If test is true, evaluates then with binding-form bound to the value of test, if not, yields else

bindings => binding-form test

If test is true, evaluates then with binding-form bound to the value of 
test, if not, yields else
raw docstring

if-notcljmacro

(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.

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

if-somecljmacro

(if-some bindings then)
(if-some bindings then else & oldform)

bindings => binding-form test

If test is not nil, evaluates then with binding-form bound to the value of test, if not, yields else

bindings => binding-form test

If test is not nil, evaluates then with binding-form bound to the
value of test, if not, yields else
raw docstring

ifn?clj

(ifn? x)

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

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

importcljmacro

(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 the class named by package.name to the current namespace. Use :import in the ns macro in preference to calling this directly.

import-list => (package-symbol class-name-symbols*)

For each name in class-name-symbols, adds a mapping from name to the
class named by package.name to the current namespace. Use :import in the ns
macro in preference to calling this directly.
raw docstring

in-nsclj

(in-ns name)

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

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

incclj

(inc x)

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

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

inc'clj

(inc' x)

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

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

init-proxyclj

(init-proxy proxy mappings)

Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and sets the proxy's fn map. Returns the proxy.

Takes a proxy instance and a map of strings (which must
correspond to methods of the proxy superclass/superinterfaces) to
fns (which must take arguments matching the corresponding method,
plus an additional (explicit) first arg corresponding to this, and
sets the proxy's fn map.  Returns the proxy.
raw docstring

instance?clj

(instance? c x)

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

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

intclj

(int x)

Coerce to int

Coerce to int
raw docstring

int-arrayclj

(int-array size-or-seq)
(int-array size init-val-or-seq)

Creates an array of ints

Creates an array of ints
raw docstring

integer?clj

(integer? n)

Returns true if n is an integer

Returns true if n is an integer
raw docstring

interleaveclj

(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.

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

internclj

(intern ns name)
(intern ns name val)

Finds or creates a var named by the symbol name in the namespace ns (which can be a symbol or a namespace), setting its root binding to val if supplied. The namespace must exist. The var will adopt any metadata from the name symbol. Returns the var.

Finds or creates a var named by the symbol name in the namespace
ns (which can be a symbol or a namespace), setting its root binding
to val if supplied. The namespace must exist. The var will adopt any
metadata from the name symbol.  Returns the var.
raw docstring

interposeclj

(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.

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

intoclj

(into to from)
(into to xform from)

Returns a new coll consisting of to-coll with all of the items of from-coll conjoined. A transducer may be supplied.

Returns a new coll consisting of to-coll with all of the items of
from-coll conjoined. A transducer may be supplied.
raw docstring

into-arrayclj

(into-array aseq)
(into-array type aseq)

Returns an array with components set to the values in aseq. The array's component type is type if provided, or the type of the first value in aseq if present, or Object. All values in aseq must be compatible with the component type. Class objects for the primitive types can be obtained using, e.g., Integer/TYPE.

Returns an array with components set to the values in aseq. The array's
component type is type if provided, or the type of the first value in
aseq if present, or Object. All values in aseq must be compatible with
the component type. Class objects for the primitive types can be obtained
using, e.g., Integer/TYPE.
raw docstring

intsclj

(ints xs)

Casts to int[]

Casts to int[]
raw docstring

io!cljmacro

(io! & body)

If an io! block occurs in a transaction, throws an IllegalStateException, else runs body in an implicit do. If the first expression in body is a literal string, will use that as the exception message.

If an io! block occurs in a transaction, throws an
IllegalStateException, else runs body in an implicit do. If the
first expression in body is a literal string, will use that as the
exception message.
raw docstring

isa?clj

(isa? child parent)
(isa? h child parent)

Returns true if (= child parent), or child is directly or indirectly derived from parent, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy

Returns true if (= child parent), or child is directly or indirectly derived from
parent, either via a Java type inheritance relationship or a
relationship established via derive. h must be a hierarchy obtained
from make-hierarchy, if not supplied defaults to the global
hierarchy
raw docstring

iterateclj

(iterate f x)

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

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

iterator-seqclj

(iterator-seq iter)

Returns a seq on a java.util.Iterator. Note that most collections providing iterators implement Iterable and thus support seq directly. Seqs cache values, thus iterator-seq should not be used on any iterator that repeatedly returns the same mutable object.

Returns a seq on a java.util.Iterator. Note that most collections
providing iterators implement Iterable and thus support seq directly.
Seqs cache values, thus iterator-seq should not be used on any
iterator that repeatedly returns the same mutable object.
raw docstring

juxtclj

(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 juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]

Takes a set of functions and returns a fn that is the juxtaposition
of those fns.  The returned fn takes a variable number of args, and
returns a vector containing the result of applying each fn to the
args (left-to-right).
((juxt a b c) x) => [(a x) (b x) (c x)]
raw docstring

keepclj

(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 of side-effects. Returns a transducer when no collection is provided.

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 of
side-effects.  Returns a transducer when no collection is provided.
raw docstring

keep-indexedclj

(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 of side-effects. Returns a stateful transducer when no collection is provided.

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 of
side-effects.  Returns a stateful transducer when no collection is
provided.
raw docstring

keyclj

(key e)

Returns the key of the map entry.

Returns the key of the map entry.
raw docstring

keysclj

(keys map)

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

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

keywordclj

(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.

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

keyword?clj

(keyword? x)

Return true if x is a Keyword

Return true if x is a Keyword
raw docstring

lastclj

(last coll)

Return the last item in coll, in linear time

Return the last item in coll, in linear time
raw docstring

lazy-catcljmacro

(lazy-cat & colls)

Expands to code which yields a lazy sequence of the concatenation of the supplied colls. Each coll expr is not evaluated until it is needed.

(lazy-cat xs ys zs) === (concat (lazy-seq xs) (lazy-seq ys) (lazy-seq zs))

Expands to code which yields a lazy sequence of the concatenation
of the supplied colls.  Each coll expr is not evaluated until it is
needed. 

(lazy-cat xs ys zs) === (concat (lazy-seq xs) (lazy-seq ys) (lazy-seq zs))
raw docstring

lazy-seqcljmacro

(lazy-seq & body)

Takes a body of expressions that returns an ISeq or nil, and yields a Seqable object that will invoke the body only the first time seq is called, and will cache the result and return it on all subsequent seq calls. See also - realized?

Takes a body of expressions that returns an ISeq or nil, and yields
a Seqable object that will invoke the body only the first time seq
is called, and will cache the result and return it on all subsequent
seq calls. See also - realized?
raw docstring

letcljmacro

(let bindings & body)

binding => binding-form init-expr

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

binding => binding-form init-expr

Evaluates the exprs in a lexical context in which the symbols in
the binding-forms are bound to their respective init-exprs or parts
therein.
raw docstring

letfncljmacro

(letfn fnspecs & body)

fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+)

Takes a vector of function specs and a body, and generates a set of bindings of functions to their names. All of the names are available in all of the definitions of the functions, as well as the body.

fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+)

Takes a vector of function specs and a body, and generates a set of
bindings of functions to their names. All of the names are available
in all of the definitions of the functions, as well as the body.
raw docstring

line-seqclj

(line-seq rdr)

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

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

listclj

(list & items)

Creates a new list containing the items.

Creates a new list containing the items.
raw docstring

list*clj

(list* args)
(list* a args)
(list* a b args)
(list* a b c args)
(list* a b c d & more)

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

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

list?clj

(list? x)

Returns true if x implements IPersistentList

Returns true if x implements IPersistentList
raw docstring

loadclj

(load & paths)

Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash or relative to the root directory for the current namespace otherwise.

Loads Clojure code from resources in classpath. A path is interpreted as
classpath-relative if it begins with a slash or relative to the root
directory for the current namespace otherwise.
raw docstring

load-fileclj

(load-file name)

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

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

load-readerclj

(load-reader rdr)

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

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

load-stringclj

(load-string s)

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

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

loaded-libsclj

(loaded-libs)

Returns a sorted set of symbols naming the currently loaded libs

Returns a sorted set of symbols naming the currently loaded libs
raw docstring

lockingcljmacro

(locking x & body)

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

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

longclj

(long x)

Coerce to long

Coerce to long
raw docstring

long-arrayclj

(long-array size-or-seq)
(long-array size init-val-or-seq)

Creates an array of longs

Creates an array of longs
raw docstring

longsclj

(longs xs)

Casts to long[]

Casts to long[]
raw docstring

loopcljmacro

(loop bindings & body)

Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-exprs or parts therein. Acts as a recur target.

Evaluates the exprs in a lexical context in which the symbols in
the binding-forms are bound to their respective init-exprs or parts
therein. Acts as a recur target.
raw docstring

macroexpandclj

(macroexpand form)

Repeatedly calls macroexpand-1 on form until it no longer represents a macro form, then returns it. Note neither macroexpand-1 nor macroexpand expand macros in subforms.

Repeatedly calls macroexpand-1 on form until it no longer
represents a macro form, then returns it.  Note neither
macroexpand-1 nor macroexpand expand macros in subforms.
raw docstring

macroexpand-1clj

(macroexpand-1 form)

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

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

make-arrayclj

(make-array type len)
(make-array type dim & more-dims)

Creates and returns an array of instances of the specified class of the specified dimension(s). Note that a class object is required. Class objects can be obtained by using their imported or fully-qualified name. Class objects for the primitive types can be obtained using, e.g., Integer/TYPE.

Creates and returns an array of instances of the specified class of
the specified dimension(s).  Note that a class object is required.
Class objects can be obtained by using their imported or
fully-qualified name.  Class objects for the primitive types can be
obtained using, e.g., Integer/TYPE.
raw docstring

make-hierarchyclj

(make-hierarchy)

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

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

mapclj

(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 to the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments. Returns a transducer when no collection is provided.

Returns a lazy sequence consisting of the result of applying f to
the set of first items of each coll, followed by applying f to the
set of second items in each coll, until any one of the colls is
exhausted.  Any remaining items in other colls are ignored. Function
f should accept number-of-colls arguments. Returns a transducer when
no collection is provided.
raw docstring

map-indexedclj

(map-indexed f)
(map-indexed f coll)

Returns a lazy sequence consisting of the result of applying f to 0 and the first item of coll, followed by applying f to 1 and the second item in coll, etc, until coll is exhausted. Thus function f should accept 2 arguments, index and item. Returns a stateful transducer when no collection is provided.

Returns a lazy sequence consisting of the result of applying f to 0
and the first item of coll, followed by applying f to 1 and the second
item in coll, etc, until coll is exhausted. Thus function f should
accept 2 arguments, index and item. Returns a stateful transducer when
no collection is provided.
raw docstring

map?clj

(map? x)

Return true if x implements IPersistentMap

Return true if x implements IPersistentMap
raw docstring

mapcatclj

(mapcat f)
(mapcat f & colls)

Returns the result of applying concat to the result of applying map to f and colls. Thus function f should return a collection. Returns a transducer when no collections are provided

Returns the result of applying concat to the result of applying map
to f and colls.  Thus function f should return a collection. Returns
a transducer when no collections are provided
raw docstring

mapvclj

(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 the set of first items of each coll, followed by applying f to the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. Function f should accept number-of-colls arguments.

Returns a vector consisting of the result of applying f to the
set of first items of each coll, followed by applying f to the set
of second items in each coll, until any one of the colls is
exhausted.  Any remaining items in other colls are ignored. Function
f should accept number-of-colls arguments.
raw docstring

maxclj

(max x)
(max x y)
(max x y & more)

Returns the greatest of the nums.

Returns the greatest of the nums.
raw docstring

max-keyclj

(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.

Returns the x for which (k x), a number, is greatest.
raw docstring

memfncljmacro

(memfn name & args)

Expands into code that creates a fn that expects to be passed an object and any args and calls the named instance method on the object passing the args. Use when you want to treat a Java method as a first-class fn. name may be type-hinted with the method receiver's type in order to avoid reflective calls.

Expands into code that creates a fn that expects to be passed an
object and any args and calls the named instance method on the
object passing the args. Use when you want to treat a Java method as
a first-class fn. name may be type-hinted with the method receiver's
type in order to avoid reflective calls.
raw docstring

memoizeclj

(memoize f)

Returns a memoized version of a referentially transparent function. The memoized version of the function keeps a cache of the mapping from arguments to results and, when calls with the same arguments are repeated often, has higher performance at the expense of higher memory use.

Returns a memoized version of a referentially transparent function. The
memoized version of the function keeps a cache of the mapping from arguments
to results and, when calls with the same arguments are repeated often, has
higher performance at the expense of higher memory use.
raw docstring

mergeclj

(merge & maps)

Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping from the latter (left-to-right) will be the mapping in the result.

Returns a map that consists of the rest of the maps conj-ed onto
the first.  If a key occurs in more than one map, the mapping from
the latter (left-to-right) will be the mapping in the result.
raw docstring

merge-withclj

(merge-with f & maps)

Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the mapping(s) from the latter (left-to-right) will be combined with the mapping in the result by calling (f val-in-result val-in-latter).

Returns a map that consists of the rest of the maps conj-ed onto
the first.  If a key occurs in more than one map, the mapping(s)
from the latter (left-to-right) will be combined with the mapping in
the result by calling (f val-in-result val-in-latter).
raw docstring

metaclj

(meta obj)

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

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

method-sigclj

(method-sig meth)

methodsclj

(methods multifn)

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

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

minclj

(min x)
(min x y)
(min x y & more)

Returns the least of the nums.

Returns the least of the nums.
raw docstring

min-keyclj

(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.

Returns the x for which (k x), a number, is least.
raw docstring

mix-collection-hashclj

(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 number of elements included in the basis. Note this is the hash code consistent with =, different from .hashCode. See http://clojure.org/data_structures#hash for full algorithms.

Mix final collection hash for ordered or unordered collections.
hash-basis is the combined collection hash, count is the number
of elements included in the basis. Note this is the hash code
consistent with =, different from .hashCode.
See http://clojure.org/data_structures#hash for full algorithms.
raw docstring

modclj

(mod num div)

Modulus of num and div. Truncates toward negative infinity.

Modulus of num and div. Truncates toward negative infinity.
raw docstring

mungeclj

(munge s)

nameclj

(name x)

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

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

namespaceclj

(namespace x)

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

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

namespace-mungeclj

(namespace-munge ns)

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

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

neg?clj

(neg? x)

Returns true if num is less than zero, else false

Returns true if num is less than zero, else false
raw docstring

newlineclj

(newline)

Writes a platform-specific newline to out

Writes a platform-specific newline to *out*
raw docstring

nextclj

(next coll)

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

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

nfirstclj

(nfirst x)

Same as (next (first x))

Same as (next (first x))
raw docstring

nil?clj

(nil? x)

Returns true if x is nil, false otherwise.

Returns true if x is nil, false otherwise.
raw docstring

nnextclj

(nnext x)

Same as (next (next x))

Same as (next (next x))
raw docstring

notclj

(not x)

Returns true if x is logical false, false otherwise.

Returns true if x is logical false, false otherwise.
raw docstring

not-any?clj

(not-any? pred coll)

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

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

not-emptyclj

(not-empty coll)

If coll is empty, returns nil, else coll

If coll is empty, returns nil, else coll
raw docstring

not-every?clj

(not-every? pred coll)

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

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

not=clj

(not= x)
(not= x y)
(not= x y & more)

Same as (not (= obj1 obj2))

Same as (not (= obj1 obj2))
raw docstring

nscljmacro

(ns name docstring? attr-map? references*)

Sets ns to the namespace named by name (unevaluated), creating it if 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-class respectively, except the arguments are unevaluated and need not be quoted. (:gen-class ...), when supplied, defaults to :name corresponding to the ns name, :main true, :impl-ns same as ns, and :init-impl-ns true. All options of gen-class are supported. The :gen-class directive is ignored when not compiling. If :gen-class is not supplied, when compiled only an nsname__init.class will be generated. If :refer-clojure is not used, a default (refer 'clojure.core) is used. Use of ns is preferred to individual 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)))

Sets *ns* to the namespace named by name (unevaluated), creating it
if 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-class
respectively, except the arguments are unevaluated and need not be
quoted. (:gen-class ...), when supplied, defaults to :name
corresponding to the ns name, :main true, :impl-ns same as ns, and
:init-impl-ns true. All options of gen-class are
supported. The :gen-class directive is ignored when not
compiling. If :gen-class is not supplied, when compiled only an
nsname__init.class will be generated. If :refer-clojure is not used, a
default (refer 'clojure.core) is used.  Use of ns is preferred to
individual 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)))
raw docstring

ns-aliasesclj

(ns-aliases ns)

Returns a map of the aliases for the namespace.

Returns a map of the aliases for the namespace.
raw docstring

ns-importsclj

(ns-imports ns)

Returns a map of the import mappings for the namespace.

Returns a map of the import mappings for the namespace.
raw docstring

ns-internsclj

(ns-interns ns)

Returns a map of the intern mappings for the namespace.

Returns a map of the intern mappings for the namespace.
raw docstring

ns-mapclj

(ns-map ns)

Returns a map of all the mappings for the namespace.

Returns a map of all the mappings for the namespace.
raw docstring

ns-nameclj

(ns-name ns)

Returns the name of the namespace, a symbol.

Returns the name of the namespace, a symbol.
raw docstring

ns-publicsclj

(ns-publics ns)

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

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

ns-refersclj

(ns-refers ns)

Returns a map of the refer mappings for the namespace.

Returns a map of the refer mappings for the namespace.
raw docstring

ns-resolveclj

(ns-resolve ns sym)
(ns-resolve ns env sym)

Returns the var or Class to which a symbol will be resolved in the namespace (unless found in the environment), else nil. Note that if the symbol is fully qualified, the var/Class to which it resolves need not be present in the namespace.

Returns the var or Class to which a symbol will be resolved in the
namespace (unless found in the environment), else nil.  Note that
if the symbol is fully qualified, the var/Class to which it resolves
need not be present in the namespace.
raw docstring

ns-unaliasclj

(ns-unalias ns sym)

Removes the alias for the symbol from the namespace.

Removes the alias for the symbol from the namespace.
raw docstring

ns-unmapclj

(ns-unmap ns sym)

Removes the mappings for the symbol from the namespace.

Removes the mappings for the symbol from the namespace.
raw docstring

nthclj

(nth coll index)
(nth coll index not-found)

Returns the value at the index. get returns nil if index out of bounds, nth throws an exception unless not-found is supplied. nth also works for strings, Java arrays, regex Matchers and Lists, and, in O(n) time, for sequences.

Returns the value at the index. get returns nil if index out of
bounds, nth throws an exception unless not-found is supplied.  nth
also works for strings, Java arrays, regex Matchers and Lists, and,
in O(n) time, for sequences.
raw docstring

nthnextclj

(nthnext coll n)

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

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

nthrestclj

(nthrest coll n)

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

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

numclj

(num x)

Coerce to Number

Coerce to Number
raw docstring

number?clj

(number? x)

Returns true if x is a Number

Returns true if x is a Number
raw docstring

numeratorclj

(numerator r)

Returns the numerator part of a Ratio.

Returns the numerator part of a Ratio.
raw docstring

object-arrayclj

(object-array size-or-seq)

Creates an array of objects

Creates an array of objects
raw docstring

odd?clj

(odd? n)

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

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

orcljmacro

(or)
(or x)
(or x & next)

Evaluates exprs one at a time, from left to right. If a form returns a logical true value, or returns that value and doesn't evaluate any of the other expressions, otherwise it returns the value of the last expression. (or) returns nil.

Evaluates exprs one at a time, from left to right. If a form
returns a logical true value, or returns that value and doesn't
evaluate any of the other expressions, otherwise it returns the
value of the last expression. (or) returns nil.
raw docstring

parentsclj

(parents tag)
(parents h tag)

Returns the immediate parents of tag, either via a Java type inheritance relationship or a relationship established via derive. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to the global hierarchy

Returns the immediate parents of tag, either via a Java type
inheritance relationship or a relationship established via derive. h
must be a hierarchy obtained from make-hierarchy, if not supplied
defaults to the global hierarchy
raw docstring

partialclj

(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, and returns a fn that takes a variable number of additional args. When called, the returned function calls f with args + additional args.

Takes a function f and fewer than the normal arguments to f, and
returns a fn that takes a variable number of additional args. When
called, the returned function calls f with args + additional args.
raw docstring

partitionclj

(partition n coll)
(partition n step coll)
(partition n step pad coll)

Returns a lazy sequence of lists of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e. the partitions do not overlap. If a pad collection is supplied, use its elements as necessary to complete last partition upto n items. In case there are not enough padding elements, return a partition with less than n items.

Returns a lazy sequence of lists of n items each, at offsets step
apart. If step is not supplied, defaults to n, i.e. the partitions
do not overlap. If a pad collection is supplied, use its elements as
necessary to complete last partition upto n items. In case there are
not enough padding elements, return a partition with less than n items.
raw docstring

partition-allclj

(partition-all n)
(partition-all n coll)
(partition-all n step coll)

Returns a lazy sequence of lists like partition, but may include partitions with fewer than n items at the end. Returns a stateful transducer when no collection is provided.

Returns a lazy sequence of lists like partition, but may include
partitions with fewer than n items at the end.  Returns a stateful
transducer when no collection is provided.
raw docstring

partition-byclj

(partition-by f)
(partition-by f coll)

Applies f to each value in coll, splitting it each time f returns a new value. Returns a lazy seq of partitions. Returns a stateful transducer when no collection is provided.

Applies f to each value in coll, splitting it each time f returns a
new value.  Returns a lazy seq of partitions.  Returns a stateful
transducer when no collection is provided.
raw docstring

pcallsclj

(pcalls & fns)

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

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

peekclj

(peek coll)

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

For a list or queue, same as first, for a vector, same as, but much
more efficient than, last. If the collection is empty, returns nil.
raw docstring

persistent!clj

(persistent! coll)

Returns a new, persistent version of the transient collection, in constant time. The transient collection cannot be used after this call, any such use will throw an exception.

Returns a new, persistent version of the transient collection, in
constant time. The transient collection cannot be used after this
call, any such use will throw an exception.
raw docstring

pmapclj

(pmap f coll)
(pmap f coll & colls)

Like map, except f is applied in parallel. Semi-lazy in that the parallel computation stays ahead of the consumption, but doesn't realize the entire result unless required. Only useful for computationally intensive functions where the time of f dominates the coordination overhead.

Like map, except f is applied in parallel. Semi-lazy in that the
parallel computation stays ahead of the consumption, but doesn't
realize the entire result unless required. Only useful for
computationally intensive functions where the time of f dominates
the coordination overhead.
raw docstring

popclj

(pop coll)

For a list or queue, returns a new list/queue without the first item, for a vector, returns a new vector without the last item. If the collection is empty, throws an exception. Note - not the same as next/butlast.

For a list or queue, returns a new list/queue without the first
item, for a vector, returns a new vector without the last item. If
the collection is empty, throws an exception.  Note - not the same
as next/butlast.
raw docstring

pop!clj

(pop! coll)

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

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

pop-thread-bindingsclj

(pop-thread-bindings)

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

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

pos?clj

(pos? x)

Returns true if num is greater than zero, else false

Returns true if num is greater than zero, else false
raw docstring

prclj

(pr)
(pr x)
(pr x & more)

Prints the object(s) to the output stream that is the current value of out. Prints the object(s), separated by spaces if there is more than one. By default, pr and prn print in a way that objects can be read by the reader

Prints the object(s) to the output stream that is the current value
of *out*.  Prints the object(s), separated by spaces if there is
more than one.  By default, pr and prn print in a way that objects
can be read by the reader
raw docstring

pr-strclj

(pr-str & xs)

pr to a string, returning it

pr to a string, returning it
raw docstring

prefer-methodclj

(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

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

prefersclj

(prefers multifn)

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

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

primitives-classnamesclj


printclj

(print & more)

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

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

(print-ctor o print-args w)



(print-simple o w)

(print-str & xs)

print to a string, returning it

print to a string, returning it
raw docstring

printfclj

(printf fmt & args)

Prints formatted output, as per format

Prints formatted output, as per format
raw docstring

printlnclj

(println & more)

Same as print followed by (newline)

Same as print followed by (newline)
raw docstring

println-strclj

(println-str & xs)

println to a string, returning it

println to a string, returning it
raw docstring

prnclj

(prn & more)

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

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

prn-strclj

(prn-str & xs)

prn to a string, returning it

prn to a string, returning it
raw docstring

promiseclj

(promise)

Returns a promise object that can be read with deref/@, and set, once only, with deliver. Calls to deref/@ prior to delivery will block, unless the variant of deref with timeout is used. All subsequent derefs will return the same delivered value without blocking. See also - realized?.

Returns a promise object that can be read with deref/@, and set,
once only, with deliver. Calls to deref/@ prior to delivery will
block, unless the variant of deref with timeout is used. All
subsequent derefs will return the same delivered value without
blocking. See also - realized?.
raw docstring

proxycljmacro

(proxy class-and-interfaces args & fs)

class-and-interfaces - a vector of class names

args - a (possibly empty) vector of arguments to the superclass constructor.

f => (name [params*] body) or (name ([params*] body) ([params+] body) ...)

Expands to code which creates a instance of a proxy class that implements the named class/interface(s) by calling the supplied fns. A single class, if provided, must be first. If not provided it defaults to Object.

The interfaces names must be valid interface types. If a method fn is not provided for a class method, the superclass methd will be called. If a method fn is not provided for an interface method, an UnsupportedOperationException will be thrown should it be called. Method fns are closures and can capture the environment in which proxy is called. Each method fn takes an additional implicit first arg, which is bound to 'this. Note that while method fns can be provided to override protected methods, they have no other access to protected members, nor to super, as these capabilities cannot be proxied.

class-and-interfaces - a vector of class names

args - a (possibly empty) vector of arguments to the superclass
constructor.

f => (name [params*] body) or
(name ([params*] body) ([params+] body) ...)

Expands to code which creates a instance of a proxy class that
implements the named class/interface(s) by calling the supplied
fns. A single class, if provided, must be first. If not provided it
defaults to Object.

The interfaces names must be valid interface types. If a method fn
is not provided for a class method, the superclass methd will be
called. If a method fn is not provided for an interface method, an
UnsupportedOperationException will be thrown should it be
called. Method fns are closures and can capture the environment in
which proxy is called. Each method fn takes an additional implicit
first arg, which is bound to 'this. Note that while method fns can
be provided to override protected methods, they have no other access
to protected members, nor to super, as these capabilities cannot be
proxied.
raw docstring

proxy-call-with-superclj

(proxy-call-with-super call this meth)

proxy-mappingsclj

(proxy-mappings proxy)

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

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

proxy-nameclj

(proxy-name super interfaces)

proxy-supercljmacro

(proxy-super meth & args)

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

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

push-thread-bindingsclj

(push-thread-bindings bindings)

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

Takes a map of Var/value pairs. Binds each Var to the associated value for the current thread. Each call MUST be accompanied by a matching call to pop-thread-bindings wrapped in a try-finally!

(push-thread-bindings bindings)
(try
  ...
  (finally
    (pop-thread-bindings)))
WARNING: This is a low-level function. Prefer high-level macros like
binding where ever possible.

Takes a map of Var/value pairs. Binds each Var to the associated value for
the current thread. Each call *MUST* be accompanied by a matching call to
pop-thread-bindings wrapped in a try-finally!

    (push-thread-bindings bindings)
    (try
      ...
      (finally
        (pop-thread-bindings)))
raw docstring

pvaluescljmacro

(pvalues & exprs)

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

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

quotclj

(quot num div)

quot[ient] of dividing numerator by denominator.

quot[ient] of dividing numerator by denominator.
raw docstring

randclj

(rand)
(rand n)

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

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

rand-intclj

(rand-int n)

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

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

rand-nthclj

(rand-nth coll)

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

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

random-sampleclj

(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.

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

rangeclj

(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 to infinity. When step is equal to 0, returns an infinite sequence of start. When start is equal to end, returns empty list.

Returns a lazy seq of nums from start (inclusive) to end
(exclusive), by step, where start defaults to 0, step to 1, and end to
infinity. When step is equal to 0, returns an infinite sequence of
start. When start is equal to end, returns empty list.
raw docstring

ratio?clj

(ratio? n)

Returns true if n is a Ratio

Returns true if n is a Ratio
raw docstring

rational?clj

(rational? n)

Returns true if n is a rational number

Returns true if n is a rational number
raw docstring

rationalizeclj

(rationalize num)

returns the rational value of num

returns the rational value of num
raw docstring

re-findclj

(re-find m)
(re-find re s)

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

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

re-groupsclj

(re-groups m)

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

Returns the groups from the most recent match/find. If there are no
nested groups, returns a string of the entire match. If there are
nested groups, returns a vector of the groups, the first element
being the entire match.
raw docstring

re-matcherclj

(re-matcher re s)

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

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

re-matchesclj

(re-matches re s)

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

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

re-patternclj

(re-pattern s)

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

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

re-seqclj

(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 with re-groups.

Returns a lazy sequence of successive matches of pattern in string,
using java.util.regex.Matcher.find(), each such match processed with
re-groups.
raw docstring

readclj

(read)
(read stream)
(read opts stream)
(read stream eof-error? eof-value)
(read stream eof-error? eof-value recursive?)

Reads the next object from stream, which must be an instance of java.io.PushbackReader or some derivee. stream defaults to the current 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 throw

Note 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

Reads the next object from stream, which must be an instance of
java.io.PushbackReader or some derivee.  stream defaults to the
current 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 throw

Note 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
raw docstring

read-lineclj

(read-line)

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

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

read-stringclj

(read-string s)
(read-string opts s)

Reads one object from the string s. Optionally include reader options, 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

Reads one object from the string s. Optionally include reader
options, 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
raw docstring

reader-conditionalclj

(reader-conditional form splicing?)

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

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

reader-conditional?clj

(reader-conditional? value)

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

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

realized?clj

(realized? x)

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

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

record?clj

(record? x)

Returns true if x is a record

Returns true if x is a record
raw docstring

reduceclj

(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, then applying f to that result and the 3rd item, etc. If coll contains no items, f must accept no arguments as well, and reduce returns the result of calling f with no arguments. If coll has only 1 item, it is returned and f is not called. If val is supplied, returns the result of applying f to val and the first item in coll, then applying f to that result and the 2nd item, etc. If coll contains no items, returns val and f is not called.

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, then
applying f to that result and the 3rd item, etc. If coll contains no
items, f must accept no arguments as well, and reduce returns the
result of calling f with no arguments.  If coll has only 1 item, it
is returned and f is not called.  If val is supplied, returns the
result of applying f to val and the first item in coll, then
applying f to that result and the 2nd item, etc. If coll contains no
items, returns val and f is not called.
raw docstring

reduce-kvclj

(reduce-kv f init coll)

Reduces an associative collection. f should be a function of 3 arguments. Returns the result of applying f to init, the first key and the first value in coll, then applying f to that result and the 2nd key and value, etc. If coll contains no entries, returns init and f is not called. Note that reduce-kv is supported on vectors, where the keys will be the ordinals.

Reduces an associative collection. f should be a function of 3
arguments. Returns the result of applying f to init, the first key
and the first value in coll, then applying f to that result and the
2nd key and value, etc. If coll contains no entries, returns init
and f is not called. Note that reduce-kv is supported on vectors,
where the keys will be the ordinals.
raw docstring

reducedclj

(reduced x)

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

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

reduced?clj

(reduced? x)

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

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

reductionsclj

(reductions f coll)
(reductions f init coll)

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

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

refclj

(ref x)
(ref x & options)

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

:meta metadata-map

:validator validate-fn

:min-history (default 0) :max-history (default 10)

If metadata-map is supplied, it will become the metadata on the ref. validate-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validate-fn should return false or throw an exception. validate-fn will be called on transaction commit, when all refs have their final values.

Normally refs accumulate history dynamically as needed to deal with read demands. If you know in advance you will need history you can set :min-history to ensure it will be available when first needed (instead of after a read fault). History is limited, and the limit can be set with :max-history.

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

:meta metadata-map

:validator validate-fn

:min-history (default 0)
:max-history (default 10)

If metadata-map is supplied, it will become the metadata on the
ref. validate-fn must be nil or a side-effect-free fn of one
argument, which will be passed the intended new state on any state
change. If the new state is unacceptable, the validate-fn should
return false or throw an exception. validate-fn will be called on
transaction commit, when all refs have their final values.

Normally refs accumulate history dynamically as needed to deal with
read demands. If you know in advance you will need history you can
set :min-history to ensure it will be available when first needed (instead
of after a read fault). History is limited, and the limit can be set
with :max-history.
raw docstring

ref-history-countclj

(ref-history-count ref)

Returns the history count of a ref

Returns the history count of a ref
raw docstring

ref-max-historyclj

(ref-max-history ref)
(ref-max-history ref n)

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

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

ref-min-historyclj

(ref-min-history ref)
(ref-min-history ref n)

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

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

ref-setclj

(ref-set ref val)

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

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

referclj

(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-tosymbol

For 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 current namespace. Throws an exception if name is already mapped to something else in the current namespace. Filters can be used to select a subset, via inclusion or exclusion, or to provide a mapping to a symbol different from the var's name, in order to prevent clashes. Use :use in the ns macro in preference to calling this directly.

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-tosymbol

For 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 current
namespace.  Throws an exception if name is already mapped to
something else in the current namespace. Filters can be used to
select a subset, via inclusion or exclusion, or to provide a mapping
to a symbol different from the var's name, in order to prevent
clashes. Use :use in the ns macro in preference to calling this directly.
raw docstring

refer-clojurecljmacro

(refer-clojure & filters)

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

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

reifycljmacro

(reify & opts+specs)

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.

recur works to method heads 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}

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.

 recur works to method heads 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}
raw docstring

release-pending-sendsclj

(release-pending-sends)

Normally, actions sent directly or indirectly during another action are held until the action completes (changes the agent's state). This function can be used to dispatch any pending sent actions immediately. This has no impact on actions sent during a transaction, which are still held until commit. If no action is occurring, does nothing. Returns the number of actions dispatched.

Normally, actions sent directly or indirectly during another action
are held until the action completes (changes the agent's
state). This function can be used to dispatch any pending sent
actions immediately. This has no impact on actions sent during a
transaction, which are still held until commit. If no action is
occurring, does nothing. Returns the number of actions dispatched.
raw docstring

remclj

(rem num div)

remainder of dividing numerator by denominator.

remainder of dividing numerator by denominator.
raw docstring

removeclj

(remove pred)
(remove pred coll)

Returns a lazy sequence of the items in coll for which (pred item) returns false. pred must be free of side-effects. Returns a transducer when no collection is provided.

Returns a lazy sequence of the items in coll for which
(pred item) returns false. pred must be free of side-effects.
Returns a transducer when no collection is provided.
raw docstring

remove-all-methodsclj

(remove-all-methods multifn)

Removes all of the methods of multimethod.

Removes all of the methods of multimethod.
raw docstring

remove-methodclj

(remove-method multifn dispatch-val)

Removes the method of multimethod associated with dispatch-value.

Removes the method of multimethod associated with dispatch-value.
raw docstring

remove-nsclj

(remove-ns sym)

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

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

remove-watchclj

(remove-watch reference key)

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

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

repeatclj

(repeat x)
(repeat n x)

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

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

repeatedlyclj

(repeatedly f)
(repeatedly n f)

Takes a function of no args, presumably with side effects, and returns an infinite (or length n if supplied) lazy sequence of calls to it

Takes a function of no args, presumably with side effects, and
returns an infinite (or length n if supplied) lazy sequence of calls
to it
raw docstring

replaceclj

(replace smap)
(replace smap coll)

Given a map of replacement pairs and a vector/collection, returns a vector/seq with any elements = a key in smap replaced with the corresponding val in smap. Returns a transducer when no collection is provided.

Given a map of replacement pairs and a vector/collection, returns a
vector/seq with any elements = a key in smap replaced with the
corresponding val in smap.  Returns a transducer when no collection
is provided.
raw docstring

replicatecljdeprecated

(replicate n x)

DEPRECATED: Use 'repeat' instead. Returns a lazy seq of n xs.

DEPRECATED: Use 'repeat' instead.
Returns a lazy seq of n xs.
raw docstring

requireclj

(require & args)

Loads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib, a prefix list that identifies multiple libs whose names share a common prefix, or a flag that modifies how all the identified libs are loaded. Use :require in the ns macro in preference to calling this directly.

Libs

A 'lib' is a named set of resources in classpath whose contents define a library of Clojure code. Lib names are symbols and each lib is associated with a Clojure namespace and a Java package that share its name. A lib's name also locates its root directory within classpath using Java's package name to classpath-relative path mapping. All resources in a lib should 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 path is 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. The root resource should contain code to create the lib's namespace (usually by using the ns macro) and load any additional lib resources.

Libspecs

A libspec is a lib name or a vector containing a lib name followed by options 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. :refer takes a list of symbols to refer from the namespace or the :all keyword to bring in all public vars.

Prefix Lists

It's common for Clojure code to depend on several libs whose names have the same prefix. When specifying libs, prefix lists can be used to reduce repetition. A prefix list contains the shared prefix followed by libspecs with the shared prefix removed from the lib names. After removing the prefix, the names that remain must not contain any periods.

Flags

A flag is a keyword. Recognized flags: :reload, :reload-all, :verbose :reload forces loading of all the identified libs even if they are already loaded :reload-all implies :reload and also forces loading of all libs that the identified libs directly or indirectly load via require or use :verbose triggers printing information about each load, alias, and refer

Example:

The following would load the libraries clojure.zip and clojure.set abbreviated as 's'.

(require '(clojure zip [set :as s]))

Loads libs, skipping any that are already loaded. Each argument is
either a libspec that identifies a lib, a prefix list that identifies
multiple libs whose names share a common prefix, or a flag that modifies
how all the identified libs are loaded. Use :require in the ns macro
in preference to calling this directly.

Libs

A 'lib' is a named set of resources in classpath whose contents define a
library of Clojure code. Lib names are symbols and each lib is associated
with a Clojure namespace and a Java package that share its name. A lib's
name also locates its root directory within classpath using Java's
package name to classpath-relative path mapping. All resources in a lib
should 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 path
is 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. The root
resource should contain code to create the lib's namespace (usually by using
the ns macro) and load any additional lib resources.

Libspecs

A libspec is a lib name or a vector containing a lib name followed by
options 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.
:refer takes a list of symbols to refer from the namespace or the :all
  keyword to bring in all public vars.

Prefix Lists

It's common for Clojure code to depend on several libs whose names have
the same prefix. When specifying libs, prefix lists can be used to reduce
repetition. A prefix list contains the shared prefix followed by libspecs
with the shared prefix removed from the lib names. After removing the
prefix, the names that remain must not contain any periods.

Flags

A flag is a keyword.
Recognized flags: :reload, :reload-all, :verbose
:reload forces loading of all the identified libs even if they are
  already loaded
:reload-all implies :reload and also forces loading of all libs that the
  identified libs directly or indirectly load via require or use
:verbose triggers printing information about each load, alias, and refer

Example:

The following would load the libraries clojure.zip and clojure.set
abbreviated as 's'.

(require '(clojure zip [set :as s]))
raw docstring

reset!clj

(reset! atom newval)

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

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

reset-meta!clj

(reset-meta! iref metadata-map)

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

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

resolveclj

(resolve sym)
(resolve env sym)

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

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

restclj

(rest coll)

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

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

restart-agentclj

(restart-agent a new-state & options)

When an agent is failed, changes the agent state to new-state and then un-fails the agent so that sends are allowed again. If a :clear-actions true option is given, any actions queued on the agent that were being held while it was failed will be discarded, otherwise those held actions will proceed. The new-state must pass the validator if any, or restart will throw an exception and the agent will remain failed with its old state and error. Watchers, if any, will NOT be notified of the new state. Throws an exception if the agent is not failed.

When an agent is failed, changes the agent state to new-state and
then un-fails the agent so that sends are allowed again.  If
a :clear-actions true option is given, any actions queued on the
agent that were being held while it was failed will be discarded,
otherwise those held actions will proceed.  The new-state must pass
the validator if any, or restart will throw an exception and the
agent will remain failed with its old state and error.  Watchers, if
any, will NOT be notified of the new state.  Throws an exception if
the agent is not failed.
raw docstring

resultset-seqclj

(resultset-seq rs)

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

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

reverseclj

(reverse coll)

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

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

reversible?clj

(reversible? coll)

Returns true if coll implements Reversible

Returns true if coll implements Reversible
raw docstring

rseqclj

(rseq rev)

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

Returns, in constant time, a seq of the items in rev (which
can be a vector or sorted-map), in reverse order. If rev is empty returns nil
raw docstring

rsubseqclj

(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 for which (test (.. sc comparator (compare ek key)) 0) is true

sc must be a sorted collection, test(s) one of <, <=, > or
>=. Returns a reverse seq of those entries with keys ek for
which (test (.. sc comparator (compare ek key)) 0) is true
raw docstring

run!clj

(run! proc coll)

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

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

satisfies?clj

(satisfies? protocol x)

Returns true if x satisfies the protocol

Returns true if x satisfies the protocol
raw docstring

secondclj

(second x)

Same as (first (next x))

Same as (first (next x))
raw docstring

select-keysclj

(select-keys map keyseq)

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

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

sendclj

(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 agent will be set to the value of:

(apply action-fn state-of-agent args)

Dispatch an action to an agent. Returns the agent immediately.
Subsequently, in a thread from a thread pool, the state of the agent
will be set to the value of:

(apply action-fn state-of-agent args)
raw docstring

send-offclj

(send-off a f & args)

Dispatch a potentially blocking action to an agent. Returns the agent immediately. Subsequently, in a separate thread, the state of the agent will be set to the value of:

(apply action-fn state-of-agent args)

Dispatch a potentially blocking action to an agent. Returns the
agent immediately. Subsequently, in a separate thread, the state of
the agent will be set to the value of:

(apply action-fn state-of-agent args)
raw docstring

send-viaclj

(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 agent will be set to the value of:

(apply action-fn state-of-agent args)

Dispatch an action to an agent. Returns the agent immediately.
Subsequently, in a thread supplied by executor, the state of the agent
will be set to the value of:

(apply action-fn state-of-agent args)
raw docstring

seqclj

(seq coll)

Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on Strings, native Java arrays (of reference types) and any objects that implement Iterable. Note that seqs cache values, thus seq should not be used on any Iterable whose iterator repeatedly returns the same mutable object.

Returns a seq on the collection. If the collection is
empty, returns nil.  (seq nil) returns nil. seq also works on
Strings, native Java arrays (of reference types) and any objects
that implement Iterable. Note that seqs cache values, thus seq
should not be used on any Iterable whose iterator repeatedly
returns the same mutable object.
raw docstring

seq?clj

(seq? x)

Return true if x implements ISeq

Return true if x implements ISeq
raw docstring

sequeclj

(seque s)
(seque n-or-q s)

Creates a queued seq on another (presumably lazy) seq s. The queued seq will produce a concrete seq in the background, and can get up to n items ahead of the consumer. n-or-q can be an integer n buffer size, or an instance of java.util.concurrent BlockingQueue. Note that reading from a seque can block if the reader gets ahead of the producer.

Creates a queued seq on another (presumably lazy) seq s. The queued
seq will produce a concrete seq in the background, and can get up to
n items ahead of the consumer. n-or-q can be an integer n buffer
size, or an instance of java.util.concurrent BlockingQueue. Note
that reading from a seque can block if the reader gets ahead of the
producer.
raw docstring

sequenceclj

(sequence coll)
(sequence xform coll)
(sequence xform coll & colls)

Coerces coll to a (possibly empty) sequence, if it is not already one. Will not force a lazy seq. (sequence nil) yields (), When a transducer is supplied, returns a lazy sequence of applications of the transform to the items in coll(s), i.e. to the set of first items of each coll, followed by the set of second items in each coll, until any one of the colls is exhausted. Any remaining items in other colls are ignored. The transform should accept number-of-colls arguments

Coerces coll to a (possibly empty) sequence, if it is not already
one. Will not force a lazy seq. (sequence nil) yields (), When a
transducer is supplied, returns a lazy sequence of applications of
the transform to the items in coll(s), i.e. to the set of first
items of each coll, followed by the set of second
items in each coll, until any one of the colls is exhausted.  Any
remaining items in other colls are ignored. The transform should accept
number-of-colls arguments
raw docstring

sequential?clj

(sequential? coll)

Returns true if coll implements Sequential

Returns true if coll implements Sequential
raw docstring

setclj

(set coll)

Returns a set of the distinct elements of coll.

Returns a set of the distinct elements of coll.
raw docstring

set-agent-send-executor!clj

(set-agent-send-executor! executor)

Sets the ExecutorService to be used by send

Sets the ExecutorService to be used by send
raw docstring

set-agent-send-off-executor!clj

(set-agent-send-off-executor! executor)

Sets the ExecutorService to be used by send-off

Sets the ExecutorService to be used by send-off
raw docstring

set-error-handler!clj

(set-error-handler! a handler-fn)

Sets the error-handler of agent a to handler-fn. If an action being run by the agent throws an exception or doesn't pass the validator fn, handler-fn will be called with two arguments: the agent and the exception.

Sets the error-handler of agent a to handler-fn.  If an action
being run by the agent throws an exception or doesn't pass the
validator fn, handler-fn will be called with two arguments: the
agent and the exception.
raw docstring

set-error-mode!clj

(set-error-mode! a mode-keyword)

Sets the error-mode of agent a to mode-keyword, which must be either :fail or :continue. If an action being run by the agent throws an exception or doesn't pass the validator fn, an error-handler may be called (see set-error-handler!), after which, if the mode is :continue, the agent will continue as if neither the action that caused the error nor the error itself ever happened.

If the mode is :fail, the agent will become failed and will stop accepting new 'send' and 'send-off' actions, and any previously queued actions will be held until a 'restart-agent'. Deref will still work, returning the state of the agent before the error.

Sets the error-mode of agent a to mode-keyword, which must be
either :fail or :continue.  If an action being run by the agent
throws an exception or doesn't pass the validator fn, an
error-handler may be called (see set-error-handler!), after which,
if the mode is :continue, the agent will continue as if neither the
action that caused the error nor the error itself ever happened.

If the mode is :fail, the agent will become failed and will stop
accepting new 'send' and 'send-off' actions, and any previously
queued actions will be held until a 'restart-agent'.  Deref will
still work, returning the state of the agent before the error.
raw docstring

set-validator!clj

(set-validator! iref validator-fn)

Sets the validator-fn for a var/ref/agent/atom. validator-fn must be nil or a side-effect-free fn of one argument, which will be passed the intended new state on any state change. If the new state is unacceptable, the validator-fn should return false or throw an exception. If the current state (root value if var) is not acceptable to the new validator, an exception will be thrown and the validator will not be changed.

Sets the validator-fn for a var/ref/agent/atom. validator-fn must be nil or a
side-effect-free fn of one argument, which will be passed the intended
new state on any state change. If the new state is unacceptable, the
validator-fn should return false or throw an exception. If the current state (root
value if var) is not acceptable to the new validator, an exception
will be thrown and the validator will not be changed.
raw docstring

set?clj

(set? x)

Returns true if x implements IPersistentSet

Returns true if x implements IPersistentSet
raw docstring

shortclj

(short x)

Coerce to short

Coerce to short
raw docstring

short-arrayclj

(short-array size-or-seq)
(short-array size init-val-or-seq)

Creates an array of shorts

Creates an array of shorts
raw docstring

shortsclj

(shorts xs)

Casts to shorts[]

Casts to shorts[]
raw docstring

shuffleclj

(shuffle coll)

Return a random permutation of coll

Return a random permutation of coll
raw docstring

shutdown-agentsclj

(shutdown-agents)

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

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

slurpclj

(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.

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.
raw docstring

someclj

(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 example this will return :fred if :fred is in the sequence, otherwise nil: (some #{:fred} 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 example
this will return :fred if :fred is in the sequence, otherwise nil:
(some #{:fred} coll)
raw docstring

some->cljmacro

(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

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

some->>cljmacro

(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

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

some-fnclj

(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 value returned by one of its composing predicates against any of its arguments, else it returns logical false. Note that f is short-circuiting in that it will stop execution on the first argument that triggers a logical true result against the original predicates.

Takes a set of predicates and returns a function f that returns the first logical true value
returned by one of its composing predicates against any of its arguments, else it returns
logical false. Note that f is short-circuiting in that it will stop execution on the first
argument that triggers a logical true result against the original predicates.
raw docstring

some?clj

(some? x)

Returns true if x is not nil, false otherwise.

Returns true if x is not nil, false otherwise.
raw docstring

sortclj

(sort coll)
(sort comp coll)

Returns a sorted sequence of the items in coll. If no comparator is supplied, uses compare. comparator must implement java.util.Comparator. If coll is a Java array, it will be modified. To avoid this, sort a copy of the array.

Returns a sorted sequence of the items in coll. If no comparator is
supplied, uses compare.  comparator must implement
java.util.Comparator.  If coll is a Java array, it will be modified.
To avoid this, sort a copy of the array.
raw docstring

sort-byclj

(sort-by keyfn coll)
(sort-by keyfn comp coll)

Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). If no comparator is supplied, uses compare. comparator must implement java.util.Comparator. If coll is a Java array, it will be modified. To avoid this, sort a copy of the array.

Returns a sorted sequence of the items in coll, where the sort
order is determined by comparing (keyfn item).  If no comparator is
supplied, uses compare.  comparator must implement
java.util.Comparator.  If coll is a Java array, it will be modified.
To avoid this, sort a copy of the array.
raw docstring

sorted-mapclj

(sorted-map & keyvals)

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

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

sorted-map-byclj

(sorted-map-by comparator & keyvals)

keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator. If any keys are equal, they are handled as if by repeated uses of assoc.

keyval => key val
Returns a new sorted map with supplied mappings, using the supplied
comparator.  If any keys are equal, they are handled as if by
repeated uses of assoc.
raw docstring

sorted-setclj

(sorted-set & keys)

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

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

sorted-set-byclj

(sorted-set-by comparator & keys)

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

Returns a new sorted set with supplied keys, using the supplied
comparator.  Any equal keys are handled as if by repeated uses of
conj.
raw docstring

sorted?clj

(sorted? coll)

Returns true if coll implements Sorted

Returns true if coll implements Sorted
raw docstring

special-symbol?clj

(special-symbol? s)

Returns true if s names a special form

Returns true if s names a special form
raw docstring

spitclj

(spit f content & options)

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

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

split-atclj

(split-at n coll)

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

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

split-withclj

(split-with pred coll)

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

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

strclj

(str)
(str x)
(str x & ys)

With no args, returns the empty string. With one arg x, returns x.toString(). (str nil) returns the empty string. With more than one arg, returns the concatenation of the str values of the args.

With no args, returns the empty string. With one arg x, returns
x.toString().  (str nil) returns the empty string. With more than
one arg, returns the concatenation of the str values of the args.
raw docstring

string?clj

(string? x)

Return true if x is a String

Return true if x is a String
raw docstring

structclj

(struct s & vals)

Returns a new structmap instance with the keys of the structure-basis. vals must be supplied for basis keys in order - where values are not supplied they will default to nil.

Returns a new structmap instance with the keys of the
structure-basis. vals must be supplied for basis keys in order -
where values are not supplied they will default to nil.
raw docstring

struct-mapclj

(struct-map s & inits)

Returns a new structmap instance with the keys of the structure-basis. keyvals may contain all, some or none of the basis keys - where values are not supplied they will default to nil. keyvals can also contain keys not in the basis.

Returns a new structmap instance with the keys of the
structure-basis. keyvals may contain all, some or none of the basis
keys - where values are not supplied they will default to nil.
keyvals can also contain keys not in the basis.
raw docstring

subsclj

(subs s start)
(subs s start end)

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

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

subseqclj

(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 for which (test (.. sc comparator (compare ek key)) 0) is true

sc must be a sorted collection, test(s) one of <, <=, > or
>=. Returns a seq of those entries with keys ek for
which (test (.. sc comparator (compare ek key)) 0) is true
raw docstring

subvecclj

(subvec v start)
(subvec v start end)

Returns a persistent vector of the items in vector from start (inclusive) to end (exclusive). If end is not supplied, defaults to (count vector). This operation is O(1) and very fast, as the resulting vector shares structure with the original and no trimming is done.

Returns a persistent vector of the items in vector from
start (inclusive) to end (exclusive).  If end is not supplied,
defaults to (count vector). This operation is O(1) and very fast, as
the resulting vector shares structure with the original and no
trimming is done.
raw docstring

supersclj

(supers class)

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

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

swap!clj

(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 called multiple times, and thus should be free of side effects. Returns the value that was swapped in.

Atomically swaps the value of atom to be:
(apply f current-value-of-atom args). Note that f may be called
multiple times, and thus should be free of side effects.  Returns
the value that was swapped in.
raw docstring

symbolclj

(symbol name)
(symbol ns name)

Returns a Symbol with the given namespace and name.

Returns a Symbol with the given namespace and name.
raw docstring

symbol?clj

(symbol? x)

Return true if x is a Symbol

Return true if x is a Symbol
raw docstring

synccljmacro

(sync flags-ignored-for-now & body)

transaction-flags => TBD, pass nil for now

Runs the exprs (in an implicit do) in a transaction that encompasses exprs and any nested calls. Starts a transaction if none is already running on this thread. Any uncaught exception will abort the transaction and flow out of sync. The exprs may be run more than once, but any effects on Refs will be atomic.

transaction-flags => TBD, pass nil for now

Runs the exprs (in an implicit do) in a transaction that encompasses
exprs and any nested calls.  Starts a transaction if none is already
running on this thread. Any uncaught exception will abort the
transaction and flow out of sync. The exprs may be run more than
once, but any effects on Refs will be atomic.
raw docstring

tagged-literalclj

(tagged-literal tag form)

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

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

tagged-literal?clj

(tagged-literal? value)

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

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

takeclj

(take n)
(take n coll)

Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n. Returns a stateful transducer when no collection is provided.

Returns a lazy sequence of the first n items in coll, or all items if
there are fewer than n.  Returns a stateful transducer when
no collection is provided.
raw docstring

take-lastclj

(take-last n coll)

Returns a seq of the last n items in coll. Depending on the type of coll may be no better than linear time. For vectors, see also subvec.

Returns a seq of the last n items in coll.  Depending on the type
of coll may be no better than linear time.  For vectors, see also subvec.
raw docstring

take-nthclj

(take-nth n)
(take-nth n coll)

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

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

take-whileclj

(take-while pred)
(take-while pred coll)

Returns a lazy sequence of successive items from coll while (pred item) returns true. pred must be free of side-effects. Returns a transducer when no collection is provided.

Returns a lazy sequence of successive items from coll while
(pred item) returns true. pred must be free of side-effects.
Returns a transducer when no collection is provided.
raw docstring

testclj

(test v)

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

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

the-nsclj

(the-ns x)

If passed a namespace, returns it. Else, when passed a symbol, returns the namespace named by it, throwing an exception if not found.

If passed a namespace, returns it. Else, when passed a symbol,
returns the namespace named by it, throwing an exception if not
found.
raw docstring

thread-bound?clj

(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.

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.
raw docstring

Throwable->mapclj

(Throwable->map o)

Constructs a data representation for a Throwable.

Constructs a data representation for a Throwable.
raw docstring

timecljmacro

(time expr)

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

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

to-arrayclj

(to-array coll)

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

Returns an array of Objects containing the contents of coll, which
can be any Collection.  Maps to java.util.Collection.toArray().
raw docstring

to-array-2dclj

(to-array-2d coll)

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

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

trampolineclj

(trampoline f)
(trampoline f & args)

trampoline can be used to convert algorithms requiring mutual recursion without stack consumption. Calls f with supplied args, if any. If f returns a fn, calls that fn with no arguments, and continues to repeat, until the return value is not a fn, then returns that non-fn value. Note that if you want to return a fn as a final value, you must wrap it in some data structure and unpack it after trampoline returns.

trampoline can be used to convert algorithms requiring mutual
recursion without stack consumption. Calls f with supplied args, if
any. If f returns a fn, calls that fn with no arguments, and
continues to repeat, until the return value is not a fn, then
returns that non-fn value. Note that if you want to return a fn as a
final value, you must wrap it in some data structure and unpack it
after trampoline returns.
raw docstring

transduceclj

(transduce xform f coll)
(transduce xform f init coll)

reduce with a transformation of f (xf). If init is not supplied, (f) will be called to produce it. f should be a reducing step function that accepts both 1 and 2 arguments, if it accepts only 2 you can add the arity-1 with 'completing'. Returns the result of applying (the transformed) xf to init and the first item in coll, then applying xf to that result and the 2nd item, etc. If coll contains no items, returns init and f is not called. Note that certain transforms may inject or skip items.

reduce with a transformation of f (xf). If init is not
supplied, (f) will be called to produce it. f should be a reducing
step function that accepts both 1 and 2 arguments, if it accepts
only 2 you can add the arity-1 with 'completing'. Returns the result
of applying (the transformed) xf to init and the first item in coll,
then applying xf to that result and the 2nd item, etc. If coll
contains no items, returns init and f is not called. Note that
certain transforms may inject or skip items.
raw docstring

transientclj

(transient coll)

Returns a new, transient version of the collection, in constant time.

Returns a new, transient version of the collection, in constant time.
raw docstring

tree-seqclj

(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 the tree.

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 the
tree.
raw docstring

true?clj

(true? x)

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

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

typeclj

(type x)

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

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

unchecked-addclj

(unchecked-add x y)

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

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

unchecked-add-intclj

(unchecked-add-int x y)

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

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

unchecked-byteclj

(unchecked-byte x)

Coerce to byte. Subject to rounding or truncation.

Coerce to byte. Subject to rounding or truncation.
raw docstring

unchecked-charclj

(unchecked-char x)

Coerce to char. Subject to rounding or truncation.

Coerce to char. Subject to rounding or truncation.
raw docstring

unchecked-decclj

(unchecked-dec x)

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

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

unchecked-dec-intclj

(unchecked-dec-int x)

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

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

unchecked-divide-intclj

(unchecked-divide-int x y)

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

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

unchecked-doubleclj

(unchecked-double x)

Coerce to double. Subject to rounding.

Coerce to double. Subject to rounding.
raw docstring

unchecked-floatclj

(unchecked-float x)

Coerce to float. Subject to rounding.

Coerce to float. Subject to rounding.
raw docstring

unchecked-incclj

(unchecked-inc x)

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

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

unchecked-inc-intclj

(unchecked-inc-int x)

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

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

unchecked-intclj

(unchecked-int x)

Coerce to int. Subject to rounding or truncation.

Coerce to int. Subject to rounding or truncation.
raw docstring

unchecked-longclj

(unchecked-long x)

Coerce to long. Subject to rounding or truncation.

Coerce to long. Subject to rounding or truncation.
raw docstring

unchecked-multiplyclj

(unchecked-multiply x y)

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

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

unchecked-multiply-intclj

(unchecked-multiply-int x y)

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

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

unchecked-negateclj

(unchecked-negate x)

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

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

unchecked-negate-intclj

(unchecked-negate-int x)

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

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

unchecked-remainder-intclj

(unchecked-remainder-int x y)

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

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

unchecked-shortclj

(unchecked-short x)

Coerce to short. Subject to rounding or truncation.

Coerce to short. Subject to rounding or truncation.
raw docstring

unchecked-subtractclj

(unchecked-subtract x y)

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

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

unchecked-subtract-intclj

(unchecked-subtract-int x y)

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

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

underiveclj

(underive tag parent)
(underive h tag parent)

Removes a parent/child relationship between parent and tag. h must be a hierarchy obtained from make-hierarchy, if not supplied defaults to, and modifies, the global hierarchy.

Removes a parent/child relationship between parent and
tag. h must be a hierarchy obtained from make-hierarchy, if not
supplied defaults to, and modifies, the global hierarchy.
raw docstring

unquoteclj


unquote-splicingclj


unreducedclj

(unreduced x)

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

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

unsigned-bit-shift-rightclj

(unsigned-bit-shift-right x n)

Bitwise shift right, without sign-extension.

Bitwise shift right, without sign-extension.
raw docstring

updateclj

(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 a key and f is a function that will take the old value and any supplied args and return the new value, and returns a new structure. If the key does not exist, nil is passed as the old value.

'Updates' a value in an associative structure, where k is a
key and f is a function that will take the old value
and any supplied args and return the new value, and returns a new
structure.  If the key does not exist, nil is passed as the old value.
raw docstring

update-inclj

(update-in m [k & ks] f & args)

'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be created.

'Updates' a value in a nested associative structure, where ks is a
sequence of keys and f is a function that will take the old value
and any supplied args and return the new value, and returns a new
nested structure.  If any levels do not exist, hash-maps will be
created.
raw docstring

update-proxyclj

(update-proxy proxy mappings)

Takes a proxy instance and a map of strings (which must correspond to methods of the proxy superclass/superinterfaces) to fns (which must take arguments matching the corresponding method, plus an additional (explicit) first arg corresponding to this, and updates (via assoc) the proxy's fn map. nil can be passed instead of a fn, in which case the corresponding method will revert to the default behavior. Note that this function can be used to update the behavior of an existing instance without changing its identity. Returns the proxy.

Takes a proxy instance and a map of strings (which must
correspond to methods of the proxy superclass/superinterfaces) to
fns (which must take arguments matching the corresponding method,
plus an additional (explicit) first arg corresponding to this, and
updates (via assoc) the proxy's fn map. nil can be passed instead of
a fn, in which case the corresponding method will revert to the
default behavior. Note that this function can be used to update the
behavior of an existing instance without changing its identity.
Returns the proxy.
raw docstring

useclj

(use & args)

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

'use accepts additional options in libspecs: :exclude, :only, :rename. The arguments and semantics for :exclude, :only, and :rename are the same as those documented for clojure.core/refer.

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

'use accepts additional options in libspecs: :exclude, :only, :rename.
The arguments and semantics for :exclude, :only, and :rename are the same
as those documented for clojure.core/refer.
raw docstring

valclj

(val e)

Returns the value in the map entry.

Returns the value in the map entry.
raw docstring

valsclj

(vals map)

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

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

var-getclj

(var-get x)

Gets the value in the var object

Gets the value in the var object
raw docstring

var-setclj

(var-set x val)

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

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

var?clj

(var? v)

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

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

vary-metaclj

(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.

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

vecclj

(vec coll)

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

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

vectorclj

(vector)
(vector a)
(vector a b)
(vector a b c)
(vector a b c d)
(vector a b c d & args)

Creates a new vector containing the args.

Creates a new vector containing the args.
raw docstring

vector-ofclj

(vector-of t)
(vector-of t & elements)

Creates a new vector of a single primitive type t, where t is one of :int :long :float :double :byte :short :char or :boolean. The resulting 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.

Creates a new vector of a single primitive type t, where t is one
of :int :long :float :double :byte :short :char or :boolean. The
resulting 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.
raw docstring

vector?clj

(vector? x)

Return true if x implements IPersistentVector

Return true if x implements IPersistentVector
raw docstring

volatile!clj

(volatile! val)

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

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

volatile?clj

(volatile? x)

Returns true if x is a volatile.

Returns true if x is a volatile.
raw docstring

vreset!clj

(vreset! vol newval)

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

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

vswap!cljmacro

(vswap! vol f & args)

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

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

whencljmacro

(when test & body)

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

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

when-firstcljmacro

(when-first bindings & body)

bindings => x xs

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

bindings => x xs

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

when-letcljmacro

(when-let bindings & body)

bindings => binding-form test

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

bindings => binding-form test

When test is true, evaluates body with binding-form bound to the value of test
raw docstring

when-notcljmacro

(when-not test & body)

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

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

when-somecljmacro

(when-some bindings & body)

bindings => binding-form test

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

bindings => binding-form test

When test is not nil, evaluates body with binding-form bound to the
value of test
raw docstring

whilecljmacro

(while test & body)

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

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

with-bindingscljmacro

(with-bindings binding-map & body)

Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. The executes body. Pops the installed bindings after body was evaluated. Returns the value of body.

Takes a map of Var/value pairs. Installs for the given Vars the associated
values as thread-local bindings. The executes body. Pops the installed
bindings after body was evaluated. Returns the value of body.
raw docstring

with-bindings*clj

(with-bindings* binding-map f & args)

Takes a map of Var/value pairs. Installs for the given Vars the associated values as thread-local bindings. Then calls f with the supplied arguments. Pops the installed bindings after f returned. Returns whatever f returns.

Takes a map of Var/value pairs. Installs for the given Vars the associated
values as thread-local bindings. Then calls f with the supplied arguments.
Pops the installed bindings after f returned. Returns whatever f returns.
raw docstring

with-in-strcljmacro

(with-in-str s & body)

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

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

with-loading-contextcljmacro

(with-loading-context & body)

with-local-varscljmacro

(with-local-vars name-vals-vec & body)

varbinding=> symbol init-expr

Executes the exprs in a context in which the symbols are bound to vars with per-thread bindings to the init-exprs. The symbols refer to the var objects themselves, and must be accessed with var-get and var-set

varbinding=> symbol init-expr

Executes the exprs in a context in which the symbols are bound to
vars with per-thread bindings to the init-exprs.  The symbols refer
to the var objects themselves, and must be accessed with var-get and
var-set
raw docstring

with-metaclj

(with-meta obj m)

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

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

with-opencljmacro

(with-open bindings & body)

bindings => [name init ...]

Evaluates body in a try expression with names bound to the values of the inits, and a finally clause that calls (.close name) on each name in reverse order.

bindings => [name init ...]

Evaluates body in a try expression with names bound to the values
of the inits, and a finally clause that calls (.close name) on each
name in reverse order.
raw docstring

with-out-strcljmacro

(with-out-str & body)

Evaluates exprs in a context in which out is bound to a fresh StringWriter. Returns the string created by any nested printing calls.

Evaluates exprs in a context in which *out* is bound to a fresh
StringWriter.  Returns the string created by any nested printing
calls.
raw docstring

with-precisioncljmacro

(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.

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.
raw docstring

with-redefscljmacro

(with-redefs bindings & body)

binding => var-symbol temp-value-expr

Temporarily redefines Vars while executing the body. The temp-value-exprs will be evaluated and each resulting value will replace in parallel the root value of its Var. After the body is executed, the root values of all the Vars will be set back to their old values. These temporary changes will be visible in all threads. Useful for mocking out functions during testing.

binding => var-symbol temp-value-expr

Temporarily redefines Vars while executing the body.  The
temp-value-exprs will be evaluated and each resulting value will
replace in parallel the root value of its Var.  After the body is
executed, the root values of all the Vars will be set back to their
old values.  These temporary changes will be visible in all threads.
Useful for mocking out functions during testing.
raw docstring

with-redefs-fnclj

(with-redefs-fn binding-map func)

Temporarily redefines Vars during a call to func. Each val of binding-map will replace the root value of its key which must be a Var. After func is called with no args, the root values of all the Vars will be set back to their old values. These temporary changes will be visible in all threads. Useful for mocking out functions during testing.

Temporarily redefines Vars during a call to func.  Each val of
binding-map will replace the root value of its key which must be
a Var.  After func is called with no args, the root values of all
the Vars will be set back to their old values.  These temporary
changes will be visible in all threads.  Useful for mocking out
functions during testing.
raw docstring

xml-seqclj

(xml-seq root)

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

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

zero?clj

(zero? x)

Returns true if num is zero, else false

Returns true if num is zero, else false
raw docstring

zipmapclj

(zipmap keys vals)

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

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

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close