Skip to main content

cljs.core

*

  • *

    Returns the product of nums. (*) returns 1.

  • *1

    bound in a repl thread to the most recent value printed

  • *2

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

  • *3

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

  • *command-line-args*

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

  • *e

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

  • *eval*

    Runtime environments may provide a way to evaluate ClojureScript forms. Whatever function *eval* is bound to will be pas...

  • *exec-tap-fn*

    Arranges to have tap functions executed via the supplied f, a function of no arguments. Returns true if successful, fals...

  • *flush-on-newline*

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

  • *global*

    Manually set the JavaScript global context. Only "window", "self" , and "global" supported.

  • *main-cli-fn*

    When compiled for a command-line target, whatever function *main-cli-fn* is set to will be called with the command-line ...

  • *ns*

    Var bound to the current namespace. Only used for bootstrapping.

  • *print-dup*

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

  • *print-err-fn*

    Each runtime environment provides a different way to print error output. Whatever function *print-err-fn* is bound to wi...

  • *print-fn*

    Each runtime environment provides a different way to print output. Whatever function *print-fn* is bound to will be pass...

  • *print-fn-bodies*

    *print-fns-bodies* controls whether functions print their source or only their names.

  • *print-length*

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

  • *print-level*

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

  • *print-meta*

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

  • *print-namespace-maps*

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

  • *print-newline*

    When set to logical false will drop newlines from printing calls. This is to work around the implicit newlines emitted b...

  • *print-readably*

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

  • *target*

    Var bound to the name value of the compiler build :target option. For example, if the compiler build :target is :nodejs,...

+

  • +

    Returns the sum of nums. (+) returns 0.

-

  • -

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

  • ->

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

  • ->>

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

.

  • .

    The instance member form works for methods and fields. They all expand into calls to the dot operator at macroexpansion ...

  • ..

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

/

  • /

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

<

  • <

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

  • <=

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

=

  • =

    Equality. Returns true if x equals y, false if not. Compares numbers and collections in a type-independent manner. Cloj...

  • ==

    Returns non-nil if nums all have the equivalent value, otherwise false. Behavior on non nums is undefined.

>

  • >

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

  • >=

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

A

  • APersistentVector

    Marker protocol

  • ASeq

    Marker protocol indicating an array sequence.

  • abs

    Returns the absolute value of a.

  • aclone

    Returns a javascript array, cloned from the passed in array

  • add-tap

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

  • add-watch

    Adds a watch function to an atom reference. The watch fn must be a fn of 4 args: a key, the reference, its old-state, it...

  • aget

    Returns the value at the index/indices. Works on JavaScript arrays.

  • alength

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

  • alter-meta!

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

  • amap

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

  • ancestors

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

  • and

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

  • any?

    Returns true if given any argument.

  • apply

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

  • areduce

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

  • array

    Creates a new javascript array. @param {...*} var_args

  • array-map

    keyval => key val Returns a new array map with supplied mappings.

  • array-seq

    Create a seq from a JavaScript array.

  • array?

    Returns true if x is a JavaScript array.

  • as->

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

  • aset

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

  • assert

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

  • assoc

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

  • assoc!

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

  • assoc-in

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

  • associative?

    Returns true if coll implements IAssociative

  • atom

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

B

  • bases

    Returns the immediate prototype of c

  • binding

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

  • bit-and

    Bitwise and

  • bit-and-not

    Bitwise and with complement

  • bit-clear

    Clear bit at index n

  • bit-count

    Counts the number of bits set in n

  • bit-flip

    Flip bit at index n

  • bit-not

    Bitwise complement

  • bit-or

    Bitwise or

  • bit-set

    Set bit at index n

  • bit-shift-left

    Bitwise shift left

  • bit-shift-right

    Bitwise shift right

  • bit-shift-right-zero-fill

    DEPRECATED: Bitwise shift right with zero fill

  • bit-test

    Test bit at index n

  • bit-xor

    Bitwise exclusive or

  • boolean

    Coerce to boolean

  • boolean?

    Return true if x is a Boolean

  • bounded-count

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

  • butlast

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

C

  • case

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

  • cat

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

  • catch

    catch-clause => (catch classname name expr*) finally-clause => (finally expr*) Catches and handles JavaScript exceptions...

  • char

    Coerce to char

  • char?

    Returns true if x is a JavaScript string of length one.

  • chunked-seq?

    Return true if x satisfies IChunkedSeq.

  • clj->js

    Recursively transforms ClojureScript values to JavaScript. sets/vectors/lists become Arrays, Keywords and Symbol become ...

  • clone

    Clone the supplied value which must implement ICloneable.

  • cloneable?

    Return true if x implements ICloneable protocol.

  • coll?

    Returns true if x satisfies ICollection

  • comment

    Ignores body, yields nil

  • comp

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

  • comparator

    Returns an JavaScript compatible comparator based upon pred.

  • compare

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

  • compare-and-set!

    Atomically sets the value of atom to newval if and only if the current value of the atom is equal to oldval. Returns tru...

  • complement

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

  • completing

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

  • concat

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

  • cond

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

  • cond->

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

  • cond->>

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

  • condp

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

  • conj

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

  • conj!

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

  • cons

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

  • constantly

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

  • contains?

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

  • count

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

  • counted?

    Returns true if coll implements count in constant time

  • create-ns

    Create a new namespace named by the symbol. Bootstrap only.

  • cycle

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

D

  • dec

    Returns a number one less than num.

  • declare

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

  • dedupe

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

  • def

    Creates and interns a global var with the name of symbol in the current namespace (*ns*) or locates such a var if it alr...

  • default-dispatch-val

    Given a multimethod, return its default-dispatch-val.

  • defmacro

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

  • defmethod

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

  • defmulti

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

  • defn

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

  • defn-

    same as defn, yielding non-public def

  • defonce

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

  • defprotocol

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

  • defrecord

    (defrecord name [fields*] options* specs*) Currently there are no options. Each spec consists of a protocol or interf...

  • deftype

    (deftype name [fields*] options* specs*) Currently there are no options. Each spec consists of a protocol or interfac...

  • delay

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

  • delay?

    returns true if x is a Delay created with delay

  • deref

    Also reader macro: @var/@atom/@delay. Returns the most-recently-committed value of ref. When applied to a var or atom, r...

  • derive

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

  • descendants

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

  • disj

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

  • disj!

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

  • dispatch-fn

    Given a multimethod, return its dispatch-fn.

  • dissoc

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

  • dissoc!

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

  • distinct

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

  • distinct?

    Returns true if no two of the arguments are =

  • do

    Evaluates the expressions in order and returns the value of the last. If no expressions are supplied, returns nil.

  • doall

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

  • dorun

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

  • doseq

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

  • dotimes

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

  • doto

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

  • double-array

    Creates an array of doubles. Does not coerce array, provided for compatibility with Clojure.

  • double?

    Returns true for JavaScript numbers, false otherwise.

  • drop

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

  • drop-last

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

  • drop-while

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

E

  • eduction

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

  • empty

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

  • empty?

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

  • enable-console-print!

    Set *print-fn* to console.log

  • ensure-reduced

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

  • equiv-map

    Test map equivalence. Returns true if x equals y, otherwise returns false.

  • es6-iterator

    Return a ES2015+ compatible iterator for coll.

  • es6-iterator-seq

    Given an ES2015+ compatible iterator return a seq.

  • eval

    Evaluates the form data structure (not text!) and returns the result. Delegates to cljs.core/*eval*. Intended for use in...

  • even?

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

  • every-pred

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

  • every?

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

  • ex-cause

    Returns exception cause (an Error / ExceptionInfo) if ex is an ExceptionInfo. Otherwise returns nil.

  • ex-data

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

  • ex-info

    Create an instance of ExceptionInfo, an Error type that carries a map of additional data.

  • ex-message

    Returns the message attached to the given Error / ExceptionInfo object. For non-Errors returns nil.

  • exists?

    Return true if argument exists, analogous to usage of typeof operator in JavaScript.

  • extend-protocol

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

  • extend-type

    Extend a type to a series of protocols. Useful when you are supplying the definitions explicitly inline. Propagates the ...

F

  • Fn

    Marker protocol

  • false?

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

  • ffirst

    Same as (first (first x))

  • filter

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

  • filterv

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

  • finally

    catch-clause => (catch classname name expr*) finally-clause => (finally expr*) Catches and handles JavaScript exceptions...

  • find

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

  • find-macros-ns

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

  • find-ns

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

  • find-ns-obj

    Bootstrap only.

  • first

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

  • flatmap

    maps f over coll and concatenates the results. Thus function f should return a collection. Returns a transducer when n...

  • flatten

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

  • float?

    Returns true for JavaScript numbers, false otherwise.

  • fn

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

  • fn?

    Return true if f is a JavaScript function or satisfies the Fn protocol.

  • fnext

    Same as (first (next x))

  • fnil

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

  • for

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

  • force

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

  • format

    Formats a string using goog.string.format.

  • frequencies

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

G

  • gensym

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

  • get

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

  • get-in

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

  • get-method

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

  • get-validator

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

  • goog-define

    Defines a var using `goog.define`. Passed default value must be string, number or boolean. Default value can be overrid...

  • group-by

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

H

  • halt-when

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

  • hash

    Returns the hash code of its argument. Note this is the hash code consistent with =.

  • hash-map

    keyval => key val Returns a new hash map with supplied mappings.

  • hash-map-lite

    :lite-mode version of hash-map, not intended to be used directly.

  • hash-ordered-coll

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

  • hash-set

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

  • hash-unordered-coll

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

I

  • IAssociative

    Protocol for adding associativity to collections.

  • IAtom

    Marker protocol indicating an atom.

  • IChunk

    Protocol for accessing the items of a chunk.

  • IChunkedNext

    Protocol for accessing the chunks of a collection.

  • IChunkedSeq

    Protocol for accessing a collection as sequential chunks.

  • ICloneable

    Protocol for cloning a value.

  • ICollection

    Protocol for adding to a collection.

  • IComparable

    Protocol for values that can be compared.

  • ICounted

    Protocol for adding the ability to count a collection in constant time.

  • IDeref

    Protocol for adding dereference functionality to a reference.

  • IDrop

    Protocol for persistent or algorithmically defined collections to provide a means of dropping N items that is more eff...

  • IEditableCollection

    Protocol for collections which can transformed to transients.

  • IEmptyableCollection

    Protocol for creating an empty collection.

  • IEquiv

    Protocol for adding value comparison functionality to a type.

  • IFind

    Protocol for implementing entry finding in collections.

  • IFn

    Protocol for adding the ability to invoke an object as a function. For example, a vector can also be used to look up a...

  • IHash

    Protocol for adding hashing functionality to a type.

  • IIndexed

    Protocol for collections to provide indexed-based access to their items.

  • IIterable

    Protocol for iterating over a collection.

  • IKVReduce

    Protocol for associative types that can reduce themselves via a function of key and val. Called by cljs.core/reduce-kv...

  • IList

    Marker interface indicating a persistent list

  • ILookup

    Protocol for looking up a value in a data structure.

  • IMap

    Protocol for adding mapping functionality to collections.

  • IMapEntry

    Protocol for examining a map entry.

  • IMeta

    Protocol for accessing the metadata of an object.

  • INamed

    Protocol for adding a name.

  • INext

    Protocol for accessing the next items of a collection.

  • IPending

    Protocol for types which can have a deferred realization. Currently only implemented by Delay and LazySeq.

  • IPrintWithWriter

    The old IPrintable protocol's implementation consisted of building a giant list of strings to concatenate. This invo...

  • IPrintable

    Do not use this. It is kept for backwards compatibility with existing user code that depends on it, but it has been ...

  • IRecord

    Marker interface indicating a record object

  • IReduce

    Protocol for seq types that can reduce themselves. Called by cljs.core/reduce.

  • IReset

    Protocol for adding resetting functionality.

  • IReversible

    Protocol for reversing a seq.

  • ISeq

    Protocol for collections to provide access to their items as sequences.

  • ISeqable

    Protocol for adding the ability to a type to be transformed into a sequence.

  • ISequential

    Marker interface indicating a persistent collection of sequential items

  • ISet

    Protocol for adding set functionality to a collection.

  • ISorted

    Protocol for a collection which can represent their items in a sorted manner.

  • IStack

    Protocol for collections to provide access to their items as stacks. The top of the stack should be accessed in the mo...

  • ISwap

    Protocol for adding swapping functionality.

  • ITransientAssociative

    Protocol for adding associativity to transient collections.

  • ITransientCollection

    Protocol for adding basic functionality to transient collections.

  • ITransientMap

    Protocol for adding mapping functionality to transient collections.

  • ITransientSet

    Protocol for adding set functionality to a transient collection.

  • ITransientVector

    Protocol for adding vector functionality to transient collections.

  • IUUID

    A marker protocol for UUIDs

  • IVector

    Protocol for adding vector functionality to collections.

  • IVolatile

    Protocol for adding volatile functionality.

  • IWatchable

    Protocol for types that can be watched. Currently only implemented by Atom.

  • IWithMeta

    Protocol for adding metadata to an object.

  • IWriter

    Protocol for writing. Currently only implemented by StringBufferWriter.

  • ident?

    Return true if x is a symbol or keyword

  • identical?

    Tests if 2 arguments are the same object

  • identity

    Returns its argument.

  • if

    Evaluates test. If not the singular values nil or false, evaluates and yields then, otherwise, evaluates and yields else...

  • if-let

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

  • if-not

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

  • if-some

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

  • ifind?

    Returns true if coll implements IFind

  • ifn?

    Returns true if f returns true for fn? or satisfies IFn.

  • implements?

    EXPERIMENTAL

  • import

    import-list => (closure-namespace constructor-name-symbols*) For each name in constructor-name-symbols, adds a mapping ...

  • in-ns

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

  • inc

    Returns a number one greater than num.

  • indexed?

    Returns true if coll implements nth in constant time

  • infinite?

    Returns true for Infinity and -Infinity values.

  • inst-ms

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

  • inst?

    Return true if x satisfies Inst

  • instance?

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

  • int

    Coerce to int.

  • int-array

    Creates an array of ints. Does not coerce array, provided for compatibility with Clojure.

  • int?

    Return true if x satisfies integer? or is an instance of goog.math.Integer or goog.math.Long.

  • integer?

    Returns true if n is a JavaScript number with no decimal part.

  • interleave

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

  • interpose

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

  • into

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

  • into-array

    Returns an array with components set to the values in aseq. Optional type argument accepted for compatibility with Cloju...

  • isa?

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

  • iterable?

    Return true if x implements IIterable protocol.

  • iterate

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

  • iteration

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

J

  • js->clj

    Recursively transforms JavaScript arrays into ClojureScript vectors, and JavaScript objects into ClojureScript maps. Wi...

  • js-comment

    Emit a top-level JavaScript multi-line comment. New lines will create a new comment line. Comment block will be preceded...

  • js-debugger

    Emit JavaScript "debugger;" statement

  • js-delete

    Delete a property from a JavaScript object. Returns true upon success, false otherwise.

  • js-inline-comment

    Emit an inline JavaScript comment.

  • js-invoke

    Invoke JavaScript object method via string. Needed when the string is not a valid unquoted property name.

  • js-iterable?

    Return true if x has a JavaScript iterator property

  • js-keys

    Return the JavaScript keys for an object.

  • js-mod

    Modulus of num and div with original javascript behavior. i.e. bug for negative numbers

  • js-obj

    Create JavaSript object from an even number arguments representing interleaved keys and values.

  • js-symbol?

    Returns true if x is an instance of Symbol

  • juxt

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

K

  • keep

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

  • keep-indexed

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

  • key

    Returns the key of the map entry.

  • keys

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

  • keyword

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

  • keyword-identical?

    Efficient test to determine that two keywords are identical.

  • keyword?

    Return true if x is a Keyword

L

  • LITE_MODE

    Boolean flag for LITE_MODE

  • LongImpl

    INTERNAL: do not use

  • last

    Return the last item in coll, in linear time

  • lazy-cat

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

  • lazy-seq

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

  • let

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

  • letfn

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

  • list

    Creates a new list containing the items.

  • list*

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

  • list?

    Returns true if x implements IList

  • load

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

  • load-file

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

  • long

    Coerce to long. Identical to `int'.

  • long-array

    Creates an array of longs. Does not coerce array, provided for compatibility with Clojure.

  • loop

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

M

  • macroexpand

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

  • macroexpand-1

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

  • make-array

    Construct a JavaScript array of the specified dimensions. Accepts ignored type argument for compatibility with Clojure. ...

  • make-hierarchy

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

  • map

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

  • map-entry?

    Returns true if x satisfies IMapEntry

  • map-indexed

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

  • map?

    Return true if x satisfies IMap

  • mapcat

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

  • mapv

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

  • max

    Returns the greatest of the nums.

  • max-key

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

  • memfn

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

  • memoize

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

  • merge

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

  • merge-with

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

  • meta

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

  • methods

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

  • min

    Returns the least of the nums.

  • min-key

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

  • mix-collection-hash

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

  • mod

    Modulus of num and div. Truncates toward negative infinity.

  • munge

    Munge symbol or string `name` for safe use in JavaScript. - Replaces '..' with '_DOT__DOT_'. - Appends '$' to JavaScrip...

  • munge-str

    Munge string `name` without considering `..` or JavaScript reserved keywords.

N

  • NS_CACHE

    Bootstrap only.

  • NaN?

    Returns true if num is NaN, else false

  • name

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

  • namespace

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

  • nat-int?

    Return true if x satisfies int? and is a natural integer value.

  • neg-int?

    Return true if x satisfies int? and is negative.

  • neg?

    Returns true if num is less than zero, else false

  • new

    The args, if any, are evaluated from left to right, and passed to the JavaScript constructor. The constructed object is ...

  • newline

    Prints a newline using *print-fn*

  • next

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

  • nfirst

    Same as (next (first x))

  • nil?

    Returns true if x is nil, false otherwise.

  • nnext

    Same as (next (next x))

  • not

    Returns true if x is logical false, false otherwise.

  • not-any?

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

  • not-empty

    If coll is empty, returns nil, else coll

  • not-every?

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

  • not=

    Same as (not (= obj1 obj2))

  • ns

    You must currently use the ns form only with the following caveats * You must use the :only form of :use * :require...

  • ns-imports

    Returns a map of the import mappings for the namespace.

  • ns-interns

    Returns a map of the intern mappings for the namespace.

  • ns-interns*

    Returns a map of the intern mappings for the namespace. Bootstrap only.

  • ns-name

    Returns the name of the namespace, a Namespace object. Bootstrap only.

  • ns-publics

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

  • ns-unmap

    Removes the mappings for the symbol from the namespace.

  • nth

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

  • nthnext

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

  • nthrest

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

  • number?

    Returns true if x is a JavaScript number.

O

  • obj-map

    :lite-mode simple key hash-map, not intended to be used directly.

  • object-array

    Creates an array of objects. Does not coerce array, provided for compatibility with Clojure.

  • object?

    Returns true if x's constructor is Object

  • odd?

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

  • or

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

P

Q

  • qualified-ident?

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

  • qualified-keyword?

    Return true if x is a keyword with a namespace

  • qualified-symbol?

    Return true if x is a symbol with a namespace

  • quot

    quot[ient] of dividing numerator by denominator.

  • quote

    Yields the unevaluated form.

R

  • rand

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

  • rand-int

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

  • rand-nth

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

  • random-sample

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

  • random-uuid

    Returns a pseudo-randomly generated UUID instance (i.e. type 4).

  • range

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

  • re-find

    Returns the first regex match, if any, of s to re, using re.exec(s). Returns a vector, containing first the matching sub...

  • re-matches

    Returns the result of (re-find re s) if re fully matches s.

  • re-pattern

    Returns an instance of RegExp which has compiled the provided string.

  • re-seq

    Returns a lazy sequence of successive matches of re in s.

  • realized?

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

  • record?

    Return true if x satisfies IRecord

  • recur

    Evaluates the exprs in order, then, in parallel, rebinds the bindings of the recursion point to the values of the exprs....

  • reduce

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

  • reduce-kv

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

  • reduceable?

    Returns true if coll satisfies IReduce

  • reduced

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

  • reduced?

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

  • reductions

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

  • refer-clojure

    Refers to all the public vars of `cljs.core`, subject to filters. Filters can include at most one each of: :exclude lis...

  • refer-global

    Refer global js vars. Supports renaming via :rename. (refer-global :only '[Date Symbol] :rename '{Symbol Sym})

  • regexp?

    Returns true if x is a JavaScript RegExp instance.

  • reify

    reify creates an object implementing a protocol. reify is a macro with the following structure: (reify options* specs*...

  • rem

    remainder of dividing numerator by denominator.

  • remove

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

  • remove-all-methods

    Removes all of the methods of multimethod.

  • remove-method

    Removes the method of multimethod associated with dispatch-value.

  • remove-tap

    Remove f from the tap set.

  • remove-watch

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

  • repeat

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

  • repeatedly

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

  • replace

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

  • replicate

    DEPRECATED: Use 'repeat' instead. Returns a lazy seq of n xs.

  • require

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

  • require-global

    Require libraries in the global JS environment. (require-global '[SomeLib :as lib :refer [foo]])

  • require-macros

    Similar to require but only for macros.

  • reset!

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

  • reset-meta!

    Atomically resets the metadata for an atom

  • reset-vals!

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

  • resolve

    Returns the var to which a symbol will be resolved in the namespace else nil.

  • rest

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

  • reverse

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

  • reversible?

    Returns true if coll satisfies? IReversible.

  • rseq

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

  • rsubseq

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

  • run!

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

S

  • satisfies?

    Returns true if x satisfies the protocol

  • second

    Same as (first (next x))

  • select-keys

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

  • seq

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

  • seq-to-map-for-destructuring

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

  • seq?

    Return true if s satisfies ISeq

  • seqable?

    Return true if the seq function is supported for s

  • sequence

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

  • sequential?

    Returns true if coll satisfies ISequential

  • set

    Returns a set of the distinct elements of coll.

  • set!

    Used to set vars and JavaScript object fields

  • set-lite

    :lite-mode version of set, not intended ot be used directly.

  • set-print-err-fn!

    Set *print-err-fn* to f.

  • set-print-fn!

    Set *print-fn* to f.

  • set-validator!

    Sets the validator-fn for an atom. validator-fn must be nil or a side-effect-free fn of one argument, which will be pass...

  • set?

    Returns true if x satisfies ISet

  • shuffle

    Return a random permutation of coll

  • simple-benchmark

    Runs expr iterations times in the context of a let expression with the given bindings, then prints out the bindings and ...

  • simple-hash-map

    keyval => key val Returns a new hash map with supplied mappings.

  • simple-ident?

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

  • simple-keyword?

    Return true if x is a keyword without a namespace

  • simple-symbol?

    Return true if x is a symbol without a namespace

  • some

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

  • some->

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

  • some->>

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

  • some-fn

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

  • some?

    Returns true if x is not nil, false otherwise.

  • sort

    Returns a sorted sequence of the items in coll. Comp can be boolean-valued comparison function, or a -/0/+ valued compar...

  • sort-by

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

  • sorted-map

    keyval => key val Returns a new sorted map with supplied mappings.

  • sorted-map-by

    keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator.

  • sorted-set

    Returns a new sorted set with supplied keys.

  • sorted-set-by

    Returns a new sorted set with supplied keys, using the supplied comparator.

  • sorted?

    Returns true if coll satisfies ISorted

  • special-symbol?

    Returns true if x names a special form

  • specify

    Identical to specify! but does not mutate its first argument. The first argument must be an ICloneable instance.

  • specify!

    Identical to reify but mutates its first argument.

  • split-at

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

  • split-with

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

  • splitv-at

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

  • str

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

  • string?

    Returns true if x is a JavaScript string.

  • subs

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

  • subseq

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

  • subvec

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

  • supers

    Returns the immediate and indirect prototypes of c, if any

  • swap!

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

  • swap-vals!

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

  • symbol

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

  • symbol-identical?

    Efficient test to determine that two symbols are identical.

  • symbol?

    Return true if x is a Symbol

  • system-time

    Returns highest resolution time offered by host in milliseconds.

T

  • Throwable->map

    Constructs a data representation for an Error with keys: :cause - root cause message :phase - error phase :via - caus...

  • tagged-literal

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

  • tagged-literal?

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

  • take

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

  • take-last

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

  • take-nth

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

  • take-while

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

  • tap>

    Sends x to any taps. Returns the result of *exec-tap-fn*, a Boolean value.

  • test

    test [v] - if var, finds fn at key :test in var metadata, if function, finds special test property. Calls it, presuming ...

  • this-as

    Defines a scope where JavaScript's implicit "this" is bound to the name provided.

  • throw

    The expr is evaluated and thrown.

  • time

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

  • to-array

    Returns an array containing the contents of coll.

  • to-array-2d

    Returns a (potentially-ragged) 2-dimensional array containing the contents of coll.

  • trampoline

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

  • transduce

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

  • transient

    Returns a new, transient version of the collection, in constant time.

  • tree-seq

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

  • true?

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

  • try

    catch-clause => (catch classname name expr*) finally-clause => (finally expr*) Catches and handles JavaScript exceptions...

  • type

    Return x's constructor.

U

  • unchecked-add

    Returns the sum of nums. (+) returns 0.

  • unchecked-add-int

    Returns the sum of nums. (+) returns 0.

  • unchecked-dec

    Returns a number one less than x, an int.

  • unchecked-dec-int

    Returns a number one less than x, an int.

  • unchecked-divide-int

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

  • unchecked-get

    INTERNAL. Compiles to JavaScript property access using bracket notation. Does not distinguish between object and array t...

  • unchecked-int

    Coerce to int.

  • unchecked-long

    Coerce to long. Identical to `int'.

  • unchecked-multiply

    Returns the product of nums. (*) returns 1.

  • unchecked-multiply-int

    Returns the product of nums. (*) returns 1.

  • unchecked-set

    INTERNAL. Compiles to JavaScript property access using bracket notation. Does not distinguish between object and array t...

  • unchecked-substract

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

  • unchecked-substract-int

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

  • unchecked-subtract

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

  • unchecked-subtract-int

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

  • undefined?

    Returns true if x identical to the JavaScript undefined value.

  • underive

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

  • unreduced

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

  • unsafe-cast

    EXPERIMENTAL: Subject to change. Unsafely cast a value to a different type.

  • unsigned-bit-shift-right

    Bitwise shift right with zero fill

  • update

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

  • update-in

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

  • update-keys

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

  • update-vals

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

  • uri?

    Returns true x is a goog.Uri instance.

  • use

    Like require, but referring vars specified by the mandatory :only option. Example: The following would load the librar...

  • use-macros

    Similar to use but only for macros.

  • uuid

    Returns a UUID consistent with the string s.

  • uuid?

    Return true if x is a UUID.

V

  • val

    Returns the value in the map entry.

  • vals

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

  • var

    The symbol must resolve to a var, and the Var object itself (not its value) is returned. The reader macro #'x expands to...

  • var?

    Returns true if v is of type cljs.core.Var

  • vary-meta

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

  • vec

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

  • vec-lite

    :lite-mode version of vec, not intended to be used directly.

  • vector

    Creates a new vector containing the args.

  • vector-lite

    :lite-mode version of vector, not intended to be used directly.

  • vector?

    Return true if x satisfies IVector

  • volatile!

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

  • volatile?

    Returns true if x is a volatile.

  • vreset!

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

  • vswap!

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

W

  • when

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

  • when-first

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

  • when-let

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

  • when-not

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

  • when-some

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

  • while

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

  • with-meta

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

  • with-out-str

    Evaluates exprs in a context in which *print-fn* is bound to .append on a fresh StringBuffer. Returns the string create...

  • with-redefs

    binding => var-symbol temp-value-expr Temporarily redefines vars while executing the body. The temp-value-exprs will b...

Z

  • zero?

    Returns true if num is zero, else false

  • zipmap

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