cljs.core
*
Returns the product of nums. (*) returns 1.
macro([] [x] [x y] [x y & more])
bound in a repl thread to the most recent value printed
valuebound in a repl thread to the second most recent value printed
valuebound in a repl thread to the third most recent value printed
value- value
- value
A sequence of the supplied command line arguments, or nil if none were supplied
valuebound in a repl thread to the most recent exception caught by the repl
valueRuntime environments may provide a way to evaluate ClojureScript forms. Whatever function *eval* is bound to will be pas...
valueArranges to have tap functions executed via the supplied f, a function of no arguments. Returns true if successful, fals...
value([f])
When set to true, output will be flushed whenever a newline is printed. Defaults to true.
valueManually set the JavaScript global context. Only "window", "self" , and "global" supported.
value- value
When compiled for a command-line target, whatever function *main-cli-fn* is set to will be called with the command-line ...
valueVar bound to the current namespace. Only used for bootstrapping.
value- value
When set to logical true, objects will be printed in a way that preserves their type when read in later. Defaults to fa...
valueEach runtime environment provides a different way to print error output. Whatever function *print-err-fn* is bound to wi...
valueEach runtime environment provides a different way to print output. Whatever function *print-fn* is bound to will be pass...
value*print-fns-bodies* controls whether functions print their source or only their names.
value*print-length* controls how many items of each collection the printer will print. If it is bound to logical false, there...
value*print-level* controls how many levels deep the printer will print nested objects. If it is bound to logical false, ther...
valueIf set to logical true, when printing an object, its metadata will also be printed in a form that can be read back by th...
value*print-namespace-maps* controls whether the printer will print namespace map literal syntax. Defaults to false, but the...
valueWhen set to logical false will drop newlines from printing calls. This is to work around the implicit newlines emitted b...
valueWhen set to logical false, strings and characters will be printed with non-alphanumeric characters converted to the appr...
valueVar bound to the name value of the compiler build :target option. For example, if the compiler build :target is :nodejs,...
value- value
- value
- value
+
Returns the sum of nums. (+) returns 0.
macro([] [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.
macro([x] [x y] [x y & more])
- function
([gmap])
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...
macro([x & forms])
Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a lis...
macro([x & forms])
.
The instance member form works for methods and fields. They all expand into calls to the dot operator at macroexpansion ...
special-form([.instanceMethod instance args*] [.-instanceField instance])
form => fieldName-symbol or (instanceMethodName-symbol args*) Expands into a member access (.) of the first member on t...
macro([x form] [x form & more])
/
If no denominators are supplied, returns 1/numerator, else returns numerator divided by all of the denominators.
macro([x] [x y] [x y & more])
<
=
>
A
Marker protocol
protocolMarker protocol indicating an array sequence.
protocol- value
([arr off end])
- value
([arr i])
- value
([arr])
- value
([edit cnt arr])
- value
([arr i next-iter])
- value
([meta nodes i s __hash])
- value
([state meta validator watches])
Returns the absolute value of a.
function([a])
Returns a javascript array, cloned from the passed in array
function([arr])
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...
function([f])
- function
([k])
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...
function([iref key f])
Returns the value at the index/indices. Works on JavaScript arrays.
macro([array idx] [array idx & idxs])
Returns the length of the array. Works on arrays of all types.
macro([array])
Atomically sets the metadata for a namespace/var/ref/agent/atom to be: (apply f its-current-meta args) f must be free ...
function([iref f & args])
Maps an expression across an array a, using an index named idx, and return value named ret, initialized to a clone of a,...
macro([a idx ret expr])
Returns the immediate and indirect parents of tag, either via a JavaScript type inheritance relationship or a relationsh...
function([tag] [h tag])
Evaluates exprs one at a time, from left to right. If a form returns logical false (nil or false), and returns that valu...
macro([] [x] [x & next])
Returns true if given any argument.
function([x])
Applies fn f to the argument list formed by prepending intervening arguments to args.
function([f args] [f x args] [f x y args] [f x y z args] [f a b c d & args])
Reduces an expression across an array a, using an index named idx, and return value named ret, initialized to init, sett...
macro([a idx ret init expr])
Creates a new javascript array. @param {...*} var_args
macro([var-args])
- function
([arr] [arr off] [arr off end])
- function
([arr k])
- function
([x])
- function
([])
keyval => key val Returns a new array map with supplied mappings.
macro([& keyvals])
Create a seq from a JavaScript array.
function([array] [array i])
Returns true if x is a JavaScript array.
function([x])
Binds name to expr, evaluates the first form in the lexical context of that binding, then binds name to that result, rep...
macro([expr name & forms])
Sets the value at the index/indices. Works on JavaScript arrays. Returns val.
macro([array idx val] [array idx idx2 & idxv])
Evaluates expr and throws an exception if it does not evaluate to logical true.
macro([x] [x message])
assoc[iate]. When applied to a map, returns a new map of the same (hashed/sorted) type, that contains the mapping of key...
function([coll k v] [coll k v & 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 i...
function([tcoll key val] [tcoll key val & kvs])
Associates a value in a nested associative structure, where ks is a sequence of keys and v is the new value and returns ...
function([m [k & ks] v])
Returns true if coll implements IAssociative
function([x])
Creates and returns an Atom with an initial value of x and zero or more options (in any order): :meta metadata-map :va...
function([x] [x & {:keys [meta validator]}])
B
- value
([edit bitmap arr])
- value
- value
([key val left right __hash])
- value
([val])
Returns the immediate prototype of c
function([c])
binding => var-symbol init-expr Creates new bindings for the (already-existing) vars, with the supplied initial values,...
macro([bindings & body])
Bitwise and
macro([x y] [x y & more])
Bitwise and with complement
macro([x y] [x y & more])
Clear bit at index n
macro([x n])
Counts the number of bits set in n
function([v])
Flip bit at index n
macro([x n])
Bitwise complement
macro([x])
Bitwise or
macro([x y] [x y & more])
Set bit at index n
macro([x n])
Bitwise shift left
macro([x n])
Bitwise shift right
macro([x n])
DEPRECATED: Bitwise shift right with zero fill
macro([x n])
Test bit at index n
macro([x n])
Bitwise exclusive or
macro([x y] [x y & more])
- macro
([hash shift])
Coerce to boolean
function([x])
Return true if x is a Boolean
function([x])
- function
([x])
If coll is counted? returns its count, else will count at most the first n elements of coll using its seq
function([n coll])
Return a seq of all but the last item in coll, in linear time
function([s])
- macro
([x])
- function
([x])
C
- value
- value
([buf end])
- value
([chunk more meta __hash])
- value
([vec node i off meta __hash])
- value
([meta first rest __hash])
- value
([meta all prev current _next])
- macro
([coll hash-fn hash-key])
Takes an expression, and a set of clauses. Each clause can take the form of either: test-constant result-expr (test-c...
macro([e & clauses])
- special-form
A transducer which concatenates the contents of each input, which must be a collection, into the reduction.
function([rf])
catch-clause => (catch classname name expr*) finally-clause => (finally expr*) Catches and handles JavaScript exceptions...
special-form([classname name expr*])
Coerce to char
function([x])
Returns true if x is a JavaScript string of length one.
function([x])
- function
([x])
- function
([k])
- function
([b])
- function
([b x])
- function
([capacity])
- function
([chunk rest])
- function
([s])
- function
([s])
- function
([s])
- function
([vec i off] [vec node i off] [vec node i off meta])
Return true if x satisfies IChunkedSeq.
function([x])
Recursively transforms ClojureScript values to JavaScript. sets/vectors/lists become Arrays, Keywords and Symbol become ...
function([x & {:keys [keyword-fn], :or {keyword-fn name}, :as options}])
Clone the supplied value which must implement ICloneable.
function([value])
Return true if x implements ICloneable protocol.
function([value])
- macro
([x y])
- macro
([x])
- macro
([x])
- macro
([x y])
Returns true if x satisfies ICollection
function([x])
Ignores body, yields nil
macro([& body])
Takes a set of functions and returns a fn that is the composition of those fns. The returned fn takes a variable number...
function([] [f] [f g] [f g h] [f1 f2 f3 & fs])
Returns an JavaScript compatible comparator based upon pred.
function([pred])
Comparator. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'grea...
function([x y])
Atomically sets the value of atom to newval if and only if the current value of the atom is equal to oldval. Returns tru...
function([a oldval newval])
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...
function([f])
Takes a reducing function f of 2 args and returns a fn suitable for transduce by adding an arity-1 signature that calls ...
function([f] [f cf])
Returns a lazy seq representing the concatenation of the elements in the supplied colls.
function([] [x] [x y] [x y & zs])
Takes a set of test/expr pairs. It evaluates each test one at a time. If a test returns logical true, cond evaluates an...
macro([& clauses])
Takes an expression and a set of test/form pairs. Threads expr (via ->) through each form for which the corresponding te...
macro([expr & clauses])
Takes an expression and a set of test/form pairs. Threads expr (via ->>) through each form for which the corresponding t...
macro([expr & clauses])
Takes a binary predicate, an expression, and a set of clauses. Each clause can take the form of either: test-expr resul...
macro([pred expr & clauses])
conj[oin]. Returns a new collection with the xs 'added'. (conj nil item) returns (item). (conj coll) returns coll. (conj...
function([] [coll] [coll x] [coll x & xs])
Adds val to the transient collection, and return tcoll. The 'addition' may happen at different 'places' depending on the...
function([] [tcoll] [tcoll val] [tcoll val & vals])
Returns a new seq where x is the first element and coll is the rest.
function([x coll])
Returns a function that takes any number of arguments and returns x.
function([x])
Returns true if key is present in the given collection, otherwise returns false. Note that for numerically indexed coll...
function([coll v])
- macro
([dest])
Returns the number of items in the collection. (count nil) returns 0. Also works on strings, arrays, and Maps
function([coll])
Returns true if coll implements count in constant time
function([x])
Create a new namespace named by the symbol. Bootstrap only.
function([sym] [sym ns-obj])
Returns a lazy (infinite!) sequence of repetitions of the items in coll.
function([coll])
D
- value
- value
- value
([f value])
Returns a number one less than num.
macro([x])
defs the supplied var names with no bindings, useful for making forward declarations.
macro([& names])
Returns a lazy sequence removing consecutive duplicates in coll. Returns a transducer when no collection is provided.
function([] [coll])
Creates and interns a global var with the name of symbol in the current namespace (*ns*) or locates such a var if it alr...
special-form([symbol doc-string? init?])
Given a multimethod, return its default-dispatch-val.
function([multifn])
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...
macro([name doc-string? attr-map? [params*] body] [name doc-string? attr-map? ([params*] body) + attr-map?])
Creates and installs a new method of multimethod associated with dispatch-value.
macro([multifn dispatch-val & fn-tail])
Creates a new multimethod with the associated dispatch function. The docstring and attribute-map are optional. Options ...
macro([name docstring? attr-map? dispatch-fn & options])
Same as (def name (core/fn [params* ] exprs*)) or (def name (core/fn ([params* ] exprs*)+)) with any doc-string or attr...
macrosame as defn, yielding non-public def
macro([name & decls])
defs name to have the root value of init iff the named var has no root value, else init is unevaluated
macro([x init])
A protocol is a named set of named methods and their signatures: (defprotocol AProtocolName ;optional doc string "A...
macro([psym & doc+methods])
(defrecord name [fields*] options* specs*) Currently there are no options. Each spec consists of a protocol or interf...
macro([rsym fields & impls])
- special-form
(deftype name [fields*] options* specs*) Currently there are no options. Each spec consists of a protocol or interfac...
macro([t fields & impls])
- special-form
Takes a body of expressions and yields a Delay object that will invoke the body only the first time it is forced (with f...
macro([& body])
returns true if x is a Delay created with delay
function([x])
- function
([name])
Also reader macro: @var/@atom/@delay. Returns the most-recently-committed value of ref. When applied to a var or atom, r...
function([o])
Establishes a parent/child relationship between parent and tag. Parent must be a namespace-qualified symbol or keyword a...
function([tag parent] [h tag parent])
Returns the immediate and indirect children of tag, through a relationship established via derive. h must be a hierarchy...
function([tag] [h tag])
disj[oin]. Returns a new set of the same (hashed/sorted) type, that does not contain key(s).
function([coll] [coll k] [coll k & ks])
disj[oin]. Returns a transient set of the same (hashed/sorted) type, that does not contain key(s).
function([tcoll val] [tcoll val & vals])
Given a multimethod, return its dispatch-fn.
function([multifn])
dissoc[iate]. Returns a new map of the same (hashed/sorted) type, that does not contain a mapping for key(s).
function([coll] [coll k] [coll k & ks])
Returns a transient map that doesn't contain a mapping for key(s).
function([tcoll key] [tcoll key & ks])
Returns a lazy sequence of the elements of coll with duplicates removed. Returns a stateful transducer when no collectio...
function([] [coll])
Returns true if no two of the arguments are =
function([x] [x y] [x y & more])
- macro
([x] [x y] [x y & more])
Evaluates the expressions in order and returns the value of the last. If no expressions are supplied, returns nil.
special-form([exprs*])
When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce th...
function([coll] [n coll])
When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce th...
function([coll] [n coll])
Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by "for". Does not retai...
macro([seq-exprs & body])
bindings => name n Repeatedly executes body (presumably for side-effects) with name bound to integers from 0 through n-...
macro([bindings & body])
Evaluates x then calls all of the methods and functions with the value of x supplied at the front of the given arguments...
macro([x & forms])
- macro
([x])
Creates an array of doubles. Does not coerce array, provided for compatibility with Clojure.
function([size-or-seq] [size init-val-or-seq])
Returns true for JavaScript numbers, false otherwise.
function([x])
- function
([x])
Returns a laziness-preserving sequence of all but the first n items in coll. Returns a stateful transducer when no colle...
function([n] [n coll])
Return a lazy sequence of all but the last n (default 1) items in coll
function([s] [n s])
Returns a lazy sequence of the items in coll starting from the first item for which (pred item) returns logical false. ...
function([pred] [pred coll])
E
- value
([s])
- value
([s])
- value
([value iter _rest])
- value
([s])
- value
([xform coll])
- value
([])
- value
([meta])
- value
([s])
- value
([message data cause])
Returns a reducible/iterable application of the transducers to the items in coll. Transducers are applied in order as if...
function([xform* coll])
Returns an empty collection of the same category as coll, or nil
function([coll])
Returns true if coll has no items. To check the emptiness of a seq, please use the idiom (seq x) rather than (not (empty...
function([coll])
Set *print-fn* to console.log
function([])
If x is already reduced?, returns it, else returns (reduced x)
function([x])
- function
([coll])
Test map equivalence. Returns true if x equals y, otherwise returns false.
function([x y])
- function
([coll])
- macro
([ty])
Return a ES2015+ compatible iterator for coll.
function([coll])
Given an ES2015+ compatible iterator return a seq.
function([iter])
- function
([coll])
Evaluates the form data structure (not text!) and returns the result. Delegates to cljs.core/*eval*. Intended for use in...
function([form])
Returns true if n is even, throws an exception if n is not an integer
function([n])
Takes a set of predicates and returns a function f that returns true if all of its composing predicates return a logical...
function([p] [p1 p2] [p1 p2 p3] [p1 p2 p3 & ps])
Returns true if (pred x) is logical true for every x in coll, else false.
function([pred coll])
Returns exception cause (an Error / ExceptionInfo) if ex is an ExceptionInfo. Otherwise returns nil.
function([ex])
Returns exception data (a map) if ex is an ExceptionInfo. Otherwise returns nil.
function([ex])
Create an instance of ExceptionInfo, an Error type that carries a map of additional data.
function([msg data] [msg data cause])
Returns the message attached to the given Error / ExceptionInfo object. For non-Errors returns nil.
function([ex])
Return true if argument exists, analogous to usage of typeof operator in JavaScript.
macro([x])
Useful when you want to provide several implementations of the same protocol all at once. Takes a single protocol and th...
macro([p & specs])
Extend a type to a series of protocols. Useful when you are supplying the definitions explicitly inline. Propagates the ...
macro([type-sym & impls])
F
Marker protocol
protocolReturns true if x is the value false, false otherwise.
macro([x])
Same as (first (first x))
function([coll])
Returns a lazy sequence of the items in coll for which (pred item) returns logical true. pred must be free of side-effec...
function([pred] [pred coll])
Returns a vector of the items in coll for which (pred item) returns logical true. pred must be free of side-effects.
function([pred coll])
catch-clause => (catch classname name expr*) finally-clause => (finally expr*) Catches and handles JavaScript exceptions...
special-form([expr*])
Returns the map entry for key, or nil if key not present.
function([coll k])
Returns the macros namespace named by the symbol or nil if it doesn't exist. Bootstrap only.
function([ns])
Returns the namespace named by the symbol or nil if it doesn't exist. Bootstrap only.
function([ns])
Bootstrap only.
function([ns])
Returns the first item in the collection. Calls seq on its argument. If coll is nil, returns nil.
function([coll])
maps f over coll and concatenates the results. Thus function f should return a collection. Returns a transducer when n...
function([f] [f coll])
Takes any nested combination of sequential things (lists, vectors, etc.) and returns their contents as a single, flat se...
function([x])
- macro
([x])
Returns true for JavaScript numbers, false otherwise.
function([x])
- function
([x])
- function
([])
params => positional-params* , or positional-params* & next-param positional-param => binding-form next-param => binding...
macro([& sigs])
- special-form
Return true if f is a JavaScript function or satisfies the Fn protocol.
function([f])
Same as (first (next x))
function([coll])
Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. ...
function([f x] [f x y] [f x y z])
List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more mo...
macro([seq-exprs body-expr])
If x is a Delay, returns the (possibly cached) value of its expression, else returns x
function([x])
Formats a string using goog.string.format.
function([fmt & args])
Returns a map from distinct items in coll to the number of times they appear.
function([coll])
G
- macro
([])
- macro
([f num-args args])
Returns a new symbol with a unique name. If a prefix string is supplied, the name is prefix# where # is some unique numb...
function([] [prefix-string])
- value
Returns the value mapped to key, not-found or nil if key not present in associative collection, set, string, array, or I...
function([o k] [o k not-found])
Returns the value in a nested associative structure, where ks is a sequence of keys. Returns nil if the key is not prese...
function([m ks] [m ks not-found])
Given a multimethod and a dispatch value, returns the dispatch fn that would apply to that value, or nil if none apply a...
function([multifn dispatch-val])
Gets the validator-fn for a var/ref/agent/atom.
function([iref])
Defines a var using `goog.define`. Passed default value must be string, number or boolean. Default value can be overrid...
macro([sym default])
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...
function([f coll])
H
- value
([edit collision-hash cnt arr])
- value
([meta count hashobj __hash])
- value
- function
([ks vs])
- value
([nil-val root-iter seen])
- value
([meta count hashobj __hash])
- value
([iter])
Returns a transducer that ends transduction when pred returns true for an input. When retf is supplied it must be a fn o...
function([pred] [pred retf])
Returns the hash code of its argument. Note this is the hash code consistent with =.
function([o])
- function
([seed hash])
- function
([f])
- function
([k])
- function
([high low])
keyval => key val Returns a new hash map with supplied mappings.
macro([& keyvals])
:lite-mode version of hash-map, not intended to be used directly.
function([& keyvals])
Returns the hash code, consistent with =, for an external ordered collection implementing Iterable. See http://clojure.o...
function([coll])
Returns a new hash set with supplied keys. Any equal keys are handled as if by repeated uses of conj.
macro([] [& keys])
- function
([k])
- function
([s])
Returns the hash code, consistent with =, for an external unordered collection implementing Iterable. For maps, the iter...
function([coll])
I
Protocol for adding associativity to collections.
protocolMarker protocol indicating an atom.
protocolProtocol for accessing the items of a chunk.
protocolProtocol for accessing the chunks of a collection.
protocolProtocol for accessing a collection as sequential chunks.
protocolProtocol for cloning a value.
protocolProtocol for adding to a collection.
protocolProtocol for values that can be compared.
protocolProtocol for adding the ability to count a collection in constant time.
protocolProtocol for adding dereference functionality to a reference.
protocol- protocol
Protocol for persistent or algorithmically defined collections to provide a means of dropping N items that is more eff...
protocolProtocol for collections which can transformed to transients.
protocolProtocol for creating an empty collection.
protocol- protocol
- protocol
Protocol for adding value comparison functionality to a type.
protocolProtocol for implementing entry finding in collections.
protocolProtocol for adding the ability to invoke an object as a function. For example, a vector can also be used to look up a...
protocolProtocol for adding hashing functionality to a type.
protocolProtocol for collections to provide indexed-based access to their items.
protocolProtocol for iterating over a collection.
protocolProtocol for associative types that can reduce themselves via a function of key and val. Called by cljs.core/reduce-kv...
protocolMarker interface indicating a persistent list
protocolProtocol for looking up a value in a data structure.
protocolProtocol for adding mapping functionality to collections.
protocolProtocol for examining a map entry.
protocolProtocol for accessing the metadata of an object.
protocol- protocol
Protocol for adding a name.
protocolProtocol for accessing the next items of a collection.
protocolProtocol for types which can have a deferred realization. Currently only implemented by Delay and LazySeq.
protocolThe old IPrintable protocol's implementation consisted of building a giant list of strings to concatenate. This invo...
protocolDo not use this. It is kept for backwards compatibility with existing user code that depends on it, but it has been ...
protocolMarker interface indicating a record object
protocolProtocol for seq types that can reduce themselves. Called by cljs.core/reduce.
protocolProtocol for adding resetting functionality.
protocolProtocol for reversing a seq.
protocolProtocol for collections to provide access to their items as sequences.
protocolProtocol for adding the ability to a type to be transformed into a sequence.
protocolMarker interface indicating a persistent collection of sequential items
protocolProtocol for adding set functionality to a collection.
protocolProtocol for a collection which can represent their items in a sorted manner.
protocolProtocol for collections to provide access to their items as stacks. The top of the stack should be accessed in the mo...
protocolProtocol for adding swapping functionality.
protocolProtocol for adding associativity to transient collections.
protocolProtocol for adding basic functionality to transient collections.
protocolProtocol for adding mapping functionality to transient collections.
protocolProtocol for adding set functionality to a transient collection.
protocolProtocol for adding vector functionality to transient collections.
protocolA marker protocol for UUIDs
protocolProtocol for adding vector functionality to collections.
protocolProtocol for adding volatile functionality.
protocolProtocol for types that can be watched. Currently only implemented by Atom.
protocolProtocol for adding metadata to an object.
protocolProtocol for writing. Currently only implemented by StringBufferWriter.
protocol- value
([arr i meta])
- value
([arr i])
- protocol
- value
([meta start end step cnt __hash])
- value
([start step count])
- value
([meta f prev-seed seed next])
- value
([xform coll])
- value
([s])
Return true if x is a symbol or keyword
function([x])
Tests if 2 arguments are the same object
macro([x y])
Returns its argument.
function([x])
Evaluates test. If not the singular values nil or false, evaluates and yields then, otherwise, evaluates and yields else...
special-form([test then else?])
bindings => binding-form test If test is true, evaluates then with binding-form bound to the value of test, if not, yi...
macro([bindings then] [bindings then else & oldform])
Evaluates test. If logical false, evaluates and returns then expr, otherwise else expr, if supplied, else nil.
macro([test then] [test then else])
bindings => binding-form test If test is not nil, evaluates then with binding-form bound to the value of test, if not, ...
macro([bindings then] [bindings then else & oldform])
Returns true if coll implements IFind
function([x])
Returns true if f returns true for fn? or satisfies IFn.
function([f])
EXPERIMENTAL
macro([psym x])
import-list => (closure-namespace constructor-name-symbols*) For each name in constructor-name-symbols, adds a mapping ...
macro([& import-symbols-or-lists])
- macro
([ns [& vars]])
Sets *cljs-ns* to the namespace named by the symbol, creating it if needed.
special-form([name])
Returns a number one greater than num.
macro([x])
Returns true if coll implements nth in constant time
function([x])
Returns true for Infinity and -Infinity values.
function([x])
Return the number of milliseconds since January 1, 1970, 00:00:00 GMT
function([inst])
Return true if x satisfies Inst
function([x])
Evaluates x and tests if it is an instance of the type c. Returns true or false
macro([c x])
Coerce to int.
macro([x])
Creates an array of ints. Does not coerce array, provided for compatibility with Clojure.
function([size-or-seq] [size init-val-or-seq])
- function
([x n])
Return true if x satisfies integer? or is an instance of goog.math.Integer or goog.math.Long.
function([x])
Returns true if n is a JavaScript number with no decimal part.
function([n])
Returns a lazy seq of the first item in each coll, then the second etc.
function([] [c1] [c1 c2] [c1 c2 & colls])
Returns a lazy seq of the elements of coll separated by sep. Returns a stateful transducer when no collection is provide...
function([sep] [sep coll])
Returns a new coll consisting of to-coll with all of the items of from-coll conjoined. A transducer may be supplied.
function([] [to] [to from] [to xform from])
Returns an array with components set to the values in aseq. Optional type argument accepted for compatibility with Cloju...
function([aseq] [type aseq])
- function
([x])
- function
([x])
Returns true if (= child parent), or child is directly or indirectly derived from parent, either via a JavaScript type i...
function([child parent] [h child parent])
- function
([coll])
Return true if x implements IIterable protocol.
function([x])
Returns a lazy sequence of x, (f x), (f (f x)) etc. f must be free of side-effects
function([f x])
Creates a seqable/reducible via repeated calls to step, a function of some (continuation token) 'k'. The first call to s...
function([step & {:keys [somef vf kf initk], :or {vf identity, kf identity, somef some?, initk nil}}])
- function
([coll])
J
- special-form
Recursively transforms JavaScript arrays into ClojureScript vectors, and JavaScript objects into ClojureScript maps. Wi...
function([x] [x & opts])
- macro
([])
Emit a top-level JavaScript multi-line comment. New lines will create a new comment line. Comment block will be preceded...
macro([comment])
Emit JavaScript "debugger;" statement
macro([])
Delete a property from a JavaScript object. Returns true upon success, false otherwise.
macro([obj key])
- macro
([x])
- macro
([key obj])
Emit an inline JavaScript comment.
macro([comment])
Invoke JavaScript object method via string. Needed when the string is not a valid unquoted property name.
function([obj s & args])
Return true if x has a JavaScript iterator property
function([x])
Return the JavaScript keys for an object.
function([obj])
Modulus of num and div with original javascript behavior. i.e. bug for negative numbers
macro([n d])
Create JavaSript object from an even number arguments representing interleaved keys and values.
macro([] [& keyvals])
- value
- macro
([s])
Returns true if x is an instance of Symbol
function([x])
Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable numb...
function([f] [f g] [f g h] [f g h & fs])
K
- value
([mseq _meta])
- value
([ns name fqn _hash])
Returns a lazy sequence of the non-nil results of (f item). Note, this means false return values will be included. f mu...
function([f] [f coll])
Returns a lazy sequence of the non-nil results of (f index item). Note, this means false return values will be included....
function([f] [f coll])
Returns the key of the map entry.
function([map-entry])
- function
([k] [k primitive-fn])
- function
([key other])
Returns a sequence of the map's keys, in the same order as (seq map).
function([map])
Returns a Keyword with the given namespace and name. Do not use : in the keyword strings, it will be added automaticall...
function([name] [ns name])
Efficient test to determine that two keywords are identical.
function([x y])
Return true if x is a Keyword
macro([x])
L
Boolean flag for LITE_MODE
value- value
([meta fn s __hash])
- value
([stepper first rest meta])
- function
([xform coll])
- function
([xform colls])
- value
([meta first rest count __hash])
- value
INTERNAL: do not use
valueReturn the last item in coll, in linear time
function([s])
Expands to code which yields a lazy sequence of the concatenation of the supplied colls. Each coll expr is not evaluate...
macro([& colls])
Takes a body of expressions that returns an ISeq or nil, and yields a ISeqable object that will invoke the body only the...
macro([& body])
- function
([stepper])
binding => binding-form init-expr binding-form => name, or destructuring-form destructuring-form => map-destructure-form...
macro([bindings & body])
- special-form
fnspec ==> (fname [params*] exprs) or (fname ([params*] exprs)+) Takes a vector of function specs and a body, and gener...
macro([fnspecs & body])
- special-form
Creates a new list containing the items.
macro([& xs])
Creates a new list containing the items prepended to the rest, the last of which will be treated as a sequence.
function([args] [a args] [a b args] [a b c args] [a b c d & more])
Returns true if x implements IList
function([x])
Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash or...
special-form([& paths])
Sequentially read and evaluate the set of forms contained in the file.
special-form([name])
- macro
([f])
- special-form
- macro
([x & forms])
Coerce to long. Identical to `int'.
function([x])
Creates an array of longs. Does not coerce array, provided for compatibility with Clojure.
function([size-or-seq] [size init-val-or-seq])
- function
([x])
Evaluates the exprs in a lexical context in which the symbols in the binding-forms are bound to their respective init-ex...
macro([bindings & body])
- special-form
M
- value
- value
- value
([vals])
- value
([key val __hash])
- value
([afn meta])
- value
([name dispatch-fn default-dispatch-val hierarchy method-table prefer-table method-cache cached-hierarchy])
- value
([iters])
- value
([xform iters nexts])
- value
- value
- function
([h1 len])
- function
([in])
- function
([in])
- function
([h1 k1])
- function
([k1])
- value
Repeatedly calls macroexpand-1 on form until it no longer represents a macro form, then returns it. Note neither macroe...
macro([quoted])
If form represents a macro form, returns its expansion, else returns form.
macro([quoted])
Construct a JavaScript array of the specified dimensions. Accepts ignored type argument for compatibility with Clojure. ...
macro([size] [type size] [type size & more-sizes])
Creates a hierarchy object for use with derive, isa? etc.
function([])
Returns a lazy sequence consisting of the result of applying f to the set of first items of each coll, followed by apply...
function([f] [f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls])
Returns true if x satisfies IMapEntry
function([x])
Returns a lazy sequence consisting of the result of applying f to 0 and the first item of coll, followed by applying f t...
function([f] [f coll])
Return true if x satisfies IMap
function([x])
Returns the result of applying concat to the result of applying map to f and colls. Thus function f should return a col...
function([f] [f & colls])
Returns a vector consisting of the result of applying f to the set of first items of each coll, followed by applying f t...
function([f coll] [f c1 c2] [f c1 c2 c3] [f c1 c2 c3 & colls])
- macro
([hash shift])
Returns the greatest of the nums.
function([x] [x y] [x y & more])
Returns the x for which (k x), a number, is greatest. If there are multiple such xs, the last one is returned.
function([k x] [k x y] [k x y & more])
Expands into code that creates a fn that expects to be passed an object and any args and calls the named instance method...
macro([name & args])
Returns a memoized version of a referentially transparent function. The memoized version of the function keeps a cache o...
function([f])
Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the m...
function([& maps])
Returns a map that consists of the rest of the maps conj-ed onto the first. If a key occurs in more than one map, the m...
function([f & maps])
Returns the metadata of obj, returns nil if there is no metadata.
function([o])
Given a multimethod, returns a map of dispatch values -> dispatch fns
function([multifn])
Returns the least of the nums.
function([x] [x y] [x y & more])
Returns the x for which (k x), a number, is least. If there are multiple such xs, the last one is returned.
function([k x] [k x y] [k x y & more])
- function
([proto obj])
Mix final collection hash for ordered or unordered collections. hash-basis is the combined collection hash, count is the...
function([hash-basis count])
- function
([sc test key])
Modulus of num and div. Truncates toward negative infinity.
function([n d])
- function
([xform iters] [xform iters nexts])
Munge symbol or string `name` for safe use in JavaScript. - Replaces '..' with '_DOT__DOT_'. - Appends '$' to JavaScrip...
function([name])
Munge string `name` without considering `..` or JavaScript reserved keywords.
function([name])
N
Bootstrap only.
valueReturns true if num is NaN, else false
function([val])
- value
([obj name])
- value
([])
- value
([arr i next-entry next-iter])
- value
([meta nodes i s __hash])
Returns the name String of a string, symbol or keyword.
function([x])
Returns the namespace String of a symbol or keyword, or nil if not present.
function([x])
Return true if x satisfies int? and is a natural integer value.
function([x])
Return true if x satisfies int? and is negative.
function([x])
Returns true if num is less than zero, else false
macro([x])
The args, if any, are evaluated from left to right, and passed to the JavaScript constructor. The constructed object is ...
special-form([Constructor. args*] [Constructor args*])
Prints a newline using *print-fn*
function([] [opts])
Returns a seq of the items after the first. Calls seq on its argument. If there are no more items, returns nil
function([coll])
Same as (next (first x))
function([coll])
- function
([])
Returns true if x is nil, false otherwise.
macro([x])
Same as (next (next x))
function([coll])
Returns true if x is logical false, false otherwise.
function([x])
Returns false if (pred x) is logical true for any x in coll, else true.
function([pred coll])
If coll is empty, returns nil, else coll
function([coll])
Returns false if (pred x) is logical true for every x in coll, else true.
function([pred coll])
- value
Same as (not (= obj1 obj2))
function([x] [x y] [x y & more])
You must currently use the ns form only with the following caveats * You must use the :only form of :use * :require...
special-form([name docstring? attr-map? references*])
- special-form
Returns a map of the import mappings for the namespace.
macro([quoted-ns])
Returns a map of the intern mappings for the namespace.
macro([quoted-ns])
Returns a map of the intern mappings for the namespace. Bootstrap only.
function([sym])
Returns the name of the namespace, a Namespace object. Bootstrap only.
function([ns-obj])
Returns a map of the public intern mappings for the namespace.
macro([quoted-ns])
Removes the mappings for the symbol from the namespace.
macro([quoted-ns quoted-sym])
Returns the value at the index. get returns nil if index out of bounds, nth throws an exception unless not-found is supp...
function([coll n] [coll n not-found])
Returns the nth next of coll, (seq coll) when n is 0.
function([coll n])
Returns the nth rest of coll, coll when n is 0.
function([coll n])
Returns true if x is a JavaScript number.
macro([x])
O
- value
([meta strkeys strobj __hash])
- value
- value
- function
([ks obj])
- value
([strkeys strobj i])
:lite-mode simple key hash-map, not intended to be used directly.
function([& keyvals])
Creates an array of objects. Does not coerce array, provided for compatibility with Clojure.
function([size-or-seq] [size init-val-or-seq])
Returns true if x's constructor is Object
function([x])
Returns true if n is odd, throws an exception if n is not an integer
function([n])
Evaluates exprs one at a time, from left to right. If a form returns a logical true value, or returns that value and doe...
macro([] [x] [x & next])
P
- value
- value
([meta cnt arr __hash])
- value
- value
- value
- function
([init])
- function
([init has-trailing?])
- function
([arr])
- function
([arr no-clone no-check])
- function
([ks vs])
- value
([arr i cnt])
- value
([arr i _meta])
- value
([meta cnt root has-nil? nil-val __hash])
- value
- function
([arr])
- function
([arr no-clone])
- function
([ks vs])
- value
([meta hash-map __hash])
- value
- function
([items])
- function
([items])
- function
([items no-clone])
- value
([meta count front rear __hash])
- value
- value
([fseq riter])
- value
([meta front rear __hash])
- value
([comp tree cnt meta __hash])
- value
- value
([meta stack ascending? cnt __hash])
- value
([meta tree-map __hash])
- value
- value
([meta cnt shift root tail __hash])
- value
- value
- value
- function
([xs no-clone])
Returns the immediate parents of tag, either via a JavaScript type inheritance relationship or a relationship establishe...
function([tag] [h tag])
Parse strings "true" or "false" and return a boolean, or nil if invalid. Note that this explicitly excludes strings with...
function([s])
Parse string with floating point components and return a floating point value, or nil if parse fails. Grammar: https://d...
function([s])
Parse string of decimal digits with optional leading -/+ and return an integer value, or nil if parse fails
function([s])
Parse a string representing a UUID and return a UUID instance, or nil if parse fails. Grammar: https://docs.oracle.com/j...
function([s])
Takes a function f and fewer than the normal arguments to f, and returns a fn that takes a variable number of additional...
function([f] [f arg1] [f arg1 arg2] [f arg1 arg2 arg3] [f arg1 arg2 arg3 & more])
Returns a lazy sequence of lists of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e. th...
function([n coll] [n step coll] [n step pad coll])
Returns a lazy sequence of lists like partition, but may include partitions with fewer than n items at the end. Returns...
function([n] [n coll] [n step coll])
Applies f to each value in coll, splitting it each time f returns a new value. Returns a lazy seq of partitions. Retur...
function([f] [f coll])
Returns a lazy sequence of vectors of n items each, at offsets step apart. If step is not supplied, defaults to n, i.e. ...
function([n coll] [n step coll] [n step pad coll])
Returns a lazy sequence of vector partitions, but may include partitions with fewer than n items at the end. Returns a s...
function([n] [n coll] [n step coll])
For a list or queue, same as first, for a vector, same as, but much more efficient than, last. If the collection is empt...
function([coll])
Returns a new, persistent version of the transient collection, in constant time. The transient collection cannot be used...
function([tcoll])
- function
([arr i _meta])
For a list or queue, returns a new list/queue without the first item, for a vector, returns a new vector without the las...
function([coll])
Removes the last item from a transient vector. If the collection is empty, throws an exception. Returns tcoll
function([tcoll])
Return true if x satisfies int? and is positive.
function([x])
Returns true if num is greater than zero, else false
macro([x])
Prints the object(s) using string-print. Prints the object(s), separated by spaces if there is more than one. By defaul...
function([& objs])
- function
([objs writer opts])
Do not use this. It is kept for backwards compatibility with the old IPrintable protocol.
function([print-one begin sep end opts coll])
- function
([writer print-one begin sep end opts coll])
pr to a string, returning it. Fundamental entrypoint to IPrintWithWriter.
function([& objs])
Support so that collections can implement toString without loading all the printing machinery.
function([obj])
Prints a sequence of objects to a string, observing all the options given in opts
function([objs opts])
Prints a sequence of objects using string-print, observing all the options given in opts
function([objs opts])
Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y when there is a conflict
function([multifn dispatch-val-x dispatch-val-y])
Given a multimethod, returns a map of preferred value -> set of other values
function([multifn])
Create seq from a primitive JavaScript Array-like.
function([prim] [prim i])
Prints the object(s) using string-print. print and println produce output for human consumption.
function- function
([m print-one writer opts])
- function
([opts obj])
- function
([prefix m print-one writer opts])
print to a string, returning it
function([& objs])
Prints formatted output, as per format
function([fmt & args])
Same as print followed by (newline)
function([& objs])
println to a string, returning it
function([& objs])
Same as pr followed by (newline).
function([& objs])
Same as pr-str followed by (newline)
function([& objs])
Same as pr-str-with-opts followed by (newline)
function([objs opts])
Q
Return true if x is a symbol or keyword with a namespace
function([x])
Return true if x is a keyword with a namespace
function([x])
Return true if x is a symbol with a namespace
function([x])
quot[ient] of dividing numerator by denominator.
function([n d])
Yields the unevaluated form.
special-form([form])
R
- value
([ci i meta])
- value
([meta start end step chunk chunk-next __hash])
- value
([start step count])
- value
([i end step])
- value
([i base arr v start end])
- value
([i record base-count fields ext-map-iter])
- value
([key val left right __hash])
- value
([val])
- value
([meta count val next __hash])
Returns a random floating point number between 0 (inclusive) and n (default 1) (exclusive).
function([] [n])
Returns a random integer between 0 (inclusive) and n (exclusive).
function([n])
Return a random element of the (sequential) collection. Will have the same performance characteristics as nth for the gi...
function([coll])
Returns items from coll with random probability of prob (0.0 - 1.0). Returns a transducer when no collection is provide...
function([prob] [prob coll])
Returns a pseudo-randomly generated UUID instance (i.e. type 4).
function([])
Returns a lazy seq of nums from start (inclusive) to end (exclusive), by step, where start defaults to 0, step to 1, and...
function([] [end] [start end] [start end step])
- function
([v start end])
Returns the first regex match, if any, of s to re, using re.exec(s). Returns a vector, containing first the matching sub...
function([re s])
Returns the result of (re-find re s) if re fully matches s.
function([re s])
Returns an instance of RegExp which has compiled the provided string.
function([s])
Returns a lazy sequence of successive matches of re in s.
function([re s])
Returns true if a value has been produced for a delay or lazy sequence.
function([x])
Return true if x satisfies IRecord
function([x])
Evaluates the exprs in order, then, in parallel, rebinds the bindings of the recursion point to the values of the exprs....
special-form([exprs*])
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 ...
function([f coll] [f val coll])
Reduces an associative collection. f should be a function of 3 arguments. Returns the result of applying f to init, the ...
function([f init coll])
Returns true if coll satisfies IReduce
function([x])
Wraps x in a way such that a reduce will terminate with the value x
function([x])
Returns true if x is the result of a call to reduced
function([r])
Returns a lazy seq of the intermediate values of the reduction (as per reduce) of coll by f, starting with init.
function([f coll] [f init coll])
Refers to all the public vars of `cljs.core`, subject to filters. Filters can include at most one each of: :exclude lis...
macro([& args])
Refer global js vars. Supports renaming via :rename. (refer-global :only '[Date Symbol] :rename '{Symbol Sym})
macro([& args])
Returns true if x is a JavaScript RegExp instance.
function([x])
reify creates an object implementing a protocol. reify is a macro with the following structure: (reify options* specs*...
macro([& impls])
remainder of dividing numerator by denominator.
function([n d])
Returns a lazy sequence of the items in coll for which (pred item) returns logical false. pred must be free of side-effe...
function([pred] [pred coll])
Removes all of the methods of multimethod.
function([multifn])
Removes the method of multimethod associated with dispatch-value.
function([multifn dispatch-val])
Remove f from the tap set.
function([f])
Removes a watch (set by add-watch) from a reference
function([iref key])
Returns a lazy (infinite!, or length n if supplied) sequence of xs.
function([x] [n x])
Takes a function of no args, presumably with side effects, and returns an infinite (or length n if supplied) lazy sequen...
function([f] [n f])
Given a map of replacement pairs and a vector/collection, returns a vector/seq with any elements = a key in smap replace...
function([smap] [smap coll])
DEPRECATED: Use 'repeat' instead. Returns a lazy seq of n xs.
function([n x])
Loads libs, skipping any that are already loaded. Each argument is either a libspec that identifies a lib or a flag that...
macro([& args])
Require libraries in the global JS environment. (require-global '[SomeLib :as lib :refer [foo]])
macro([& args])
Similar to require but only for macros.
macro([& args])
Sets the value of atom to newval without regard for the current value. Returns new-value.
function([a new-value])
Atomically resets the metadata for an atom
function([iref m])
Sets the value of atom to newval. Returns [old new], the value of the atom before and after the reset.
function([a new-value])
Returns the var to which a symbol will be resolved in the namespace else nil.
macro([quoted-sym])
Returns a possibly empty seq of the items after the first. Calls seq on its argument.
function([coll])
Returns a seq of the items in coll in reverse order. Not lazy.
function([coll])
Returns true if coll satisfies? IReversible.
function([coll])
Returns, in constant time, a seq of the items in rev (which can be a vector or sorted-map), in reverse order. If rev is ...
function([rev])
sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a reverse seq of those entries with keys ek for w...
function([sc test key] [sc start-test start-key end-test end-key])
Runs the supplied procedure (via reduce), for purposes of side effects, on successive items in the collection. Returns n...
function([proc coll])
S
- value
([_seq _next])
- value
([meta hash-map __hash])
- value
- value
([s])
- value
([meta hash-map __hash])
- value
([val])
- value
([xform iter])
- value
([sb])
- value
([s i])
- value
([meta v start end __hash])
- value
([ns name str _hash _meta])
Returns true if x satisfies the protocol
macro([psym x])
Same as (first (next x))
function([coll])
Returns a map containing only those entries in map whose key is in keys
function([map keyseq])
Returns a seq on the collection. If the collection is empty, returns nil. (seq nil) returns nil. seq also works on Stri...
function([coll])
- function
([coll])
Builds a map from a seq as described in https://clojure.org/reference/special_forms#keyword-arguments
function([s])
Return true if s satisfies ISeq
function([s])
Return true if the seq function is supported for s
function([s])
Coerces coll to a (possibly empty) sequence, if it is not already one. Will not force a lazy seq. (sequence nil) yields ...
function([coll] [xform coll] [xform coll & colls])
Returns true if coll satisfies ISequential
function([x])
Returns a set of the distinct elements of coll.
function([coll])
Used to set vars and JavaScript object fields
special-form([var-symbol expr] [(.- instance-expr instanceFieldName-symbol) expr])
- function
([coll])
- function
([iseq])
:lite-mode version of set, not intended ot be used directly.
function([coll])
Set *print-err-fn* to f.
function([f])
Set *print-fn* to f.
function([f])
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...
function([iref val])
Returns true if x satisfies ISet
function([x])
- macro
([x])
- function
([x])
Return a random permutation of coll
function([coll])
Runs expr iterations times in the context of a let expression with the given bindings, then prints out the bindings and ...
macro([bindings expr iterations & {:keys [print-fn], :or {print-fn (quote println)}}])
keyval => key val Returns a new hash map with supplied mappings.
function([& keyvals])
Return true if x is a symbol or keyword without a namespace
function([x])
Return true if x is a keyword without a namespace
function([x])
- function
([coll])
Return true if x is a symbol without a namespace
function([x])
- function
([coll])
- function
([& args])
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,...
function([pred coll])
When expr is not nil, threads it into the first form (via ->), and when that result is not nil, through the next etc
macro([expr & forms])
When expr is not nil, threads it into the first form (via ->>), and when that result is not nil, through the next etc
macro([expr & forms])
Takes a set of predicates and returns a function f that returns the first logical true value returned by one of its comp...
function([p] [p1 p2] [p1 p2 p3] [p1 p2 p3 & ps])
Returns true if x is not nil, false otherwise.
macro([x])
Returns a sorted sequence of the items in coll. Comp can be boolean-valued comparison function, or a -/0/+ valued compar...
function([coll] [comp coll])
Returns a sorted sequence of the items in coll, where the sort order is determined by comparing (keyfn item). Comp can ...
function([keyfn coll] [keyfn comp coll])
keyval => key val Returns a new sorted map with supplied mappings.
function([& keyvals])
keyval => key val Returns a new sorted map with supplied mappings, using the supplied comparator.
function([comparator & keyvals])
Returns a new sorted set with supplied keys.
function([& keys])
Returns a new sorted set with supplied keys, using the supplied comparator.
function([comparator & keys])
Returns true if coll satisfies ISorted
function([x])
Returns true if x names a special form
function([x])
Identical to specify! but does not mutate its first argument. The first argument must be an ICloneable instance.
macro([expr & impls])
Identical to reify but mutates its first argument.
macro([expr & impls])
Returns a vector of [(take n coll) (drop n coll)]
function([n coll])
Returns a vector of [(take-while pred coll) (drop-while pred coll)]
function([pred coll])
Returns a vector of [(into [] (take n) coll) (drop n coll)]
function([n coll])
- function
([arglist])
- function
([xform iter])
With no args, returns the empty string. With one arg x, returns x.toString(). (str nil) returns the empty string. With ...
macro([] [x] [x & ys])
- macro
([] [x] [x & ys])
- value
- value
- function
([x])
- function
([x])
Returns true if x is a JavaScript string.
macro([x])
Returns the substring of s beginning at start inclusive, and ending at end (defaults to length of string), exclusive.
function([s start] [s start end])
sc must be a sorted collection, test(s) one of <, <=, > or >=. Returns a seq of those entries with keys ek for which (te...
function([sc test key] [sc start-test start-key end-test end-key])
Returns a persistent vector of the items in vector from start (inclusive) to end (exclusive). If end is not supplied, d...
function([v start] [v start end])
Returns the immediate and indirect prototypes of c, if any
function([c])
Atomically swaps the value of atom to be: (apply f current-value-of-atom args). Note that f may be called multiple times...
function([a f] [a f x] [a f x y] [a f x y & more])
Atomically swaps the value of atom to be: (apply f current-value-of-atom args). Note that f may be called multiple times...
function([a f] [a f x] [a f x y] [a f x y & more])
Returns a Symbol with the given namespace and name. Arity-1 works on strings, keywords, and vars.
function([name] [ns name])
Efficient test to determine that two symbols are identical.
function([x y])
Return true if x is a Symbol
macro([x])
Returns highest resolution time offered by host in milliseconds.
function([])
T
- value
([tag form])
Constructs a data representation for an Error with keys: :cause - root cause message :phase - error phase :via - caus...
function([o])
- value
([buffer _next completed xf sourceIter multi])
- function
([xform source])
- function
([xform sources])
- value
([editable? len arr])
- value
([edit root count has-nil? nil-val])
- value
([transient-map])
- value
([cnt shift root tail])
Construct a data representation of a tagged literal from a tag symbol and a form.
function([tag form])
Return true if the value is the data representation of a tagged literal
function([value])
Returns a lazy sequence of the first n items in coll, or all items if there are fewer than n. Returns a stateful transd...
function([n] [n coll])
Returns a seq of the last n items in coll. Depending on the type of coll may be no better than linear time. For vector...
function([n coll])
Returns a lazy seq of every nth item in coll. Returns a stateful transducer when no collection is provided.
function([n] [n coll])
Returns a lazy sequence of successive items from coll while (pred item) returns logical true. pred must be free of side-...
function([pred] [pred coll])
Sends x to any taps. Returns the result of *exec-tap-fn*, a Boolean value.
function([x])
test [v] - if var, finds fn at key :test in var metadata, if function, finds special test property. Calls it, presuming ...
function([v])
Defines a scope where JavaScript's implicit "this" is bound to the name provided.
macro([name & body])
The expr is evaluated and thrown.
special-form([expr])
Evaluates expr and prints the time it took. Returns the value of expr.
macro([expr])
Returns an array containing the contents of coll.
function([coll])
Returns a (potentially-ragged) 2-dimensional array containing the contents of coll.
function([coll])
trampoline can be used to convert algorithms requiring mutual recursion without stack consumption. Calls f with supplied...
function([f] [f & args])
reduce with a transformation of f (xf). If init is not supplied, (f) will be called to produce it. f should be a reducin...
function([xform f coll] [xform f init coll])
- function
([xform sourceIter multi])
Returns a new, transient version of the collection, in constant time.
function([coll])
Returns a lazy sequence of the nodes in a tree, via a depth-first walk. branch? must be a fn of one arg that returns tru...
function([branch? children root])
Returns true if x is the value true, false otherwise.
macro([x])
- macro
([x])
catch-clause => (catch classname name expr*) finally-clause => (finally expr*) Catches and handles JavaScript exceptions...
special-form([expr* catch-clause* finally-clause?])
- special-form
Return x's constructor.
function([x])
- function
([ty])
U
- value
([uuid __hash])
Returns the sum of nums. (+) returns 0.
macro([] [x] [x y] [x y & more])
Returns the sum of nums. (+) returns 0.
macro([] [x] [x y] [x y & more])
- macro
([x])
- macro
([x])
Returns a number one less than x, an int.
macro([x])
Returns a number one less than x, an int.
macro([x])
If no denominators are supplied, returns 1/numerator, else returns numerator divided by all of the denominators.
macro([x] [x y] [x y & more])
- macro
([x])
- macro
([x])
INTERNAL. Compiles to JavaScript property access using bracket notation. Does not distinguish between object and array t...
macro([obj key])
- macro
([x])
- macro
([x])
Coerce to int.
function([x])
Coerce to long. Identical to `int'.
function([x])
- macro
([x] [x y] [x y & more])
- macro
([x] [x y] [x y & more])
Returns the product of nums. (*) returns 1.
macro([] [x] [x y] [x y & more])
Returns the product of nums. (*) returns 1.
macro([] [x] [x y] [x y & more])
- macro
([x])
- macro
([x])
- macro
([x n])
INTERNAL. Compiles to JavaScript property access using bracket notation. Does not distinguish between object and array t...
macro([obj key val])
- macro
([x])
If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result.
function([x] [x y] [x y & more])
If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result.
function([x] [x y] [x y & more])
If no ys are supplied, returns the negation of x, else subtracts the ys from x and returns the result.
macro([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.
macro([x] [x y] [x y & more])
Returns true if x identical to the JavaScript undefined value.
macro([x])
Removes a parent/child relationship between parent and tag. h must be a hierarchy obtained from make-hierarchy, if not s...
function([tag parent] [h tag parent])
If x is reduced?, returns (deref x), else returns x
function([x])
- macro
([x y] [x y & more])
EXPERIMENTAL: Subject to change. Unsafely cast a value to a different type.
macro([t x])
Bitwise shift right with zero fill
macro([x n])
'Updates' a value in an associative structure, where k is a key and f is a function that will take the old value and any...
function([m k f] [m k f x] [m k f x y] [m k f x y z] [m k f x y z & more])
'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take t...
function([m [k & ks] f] [m [k & ks] f a] [m [k & ks] f a b] [m [k & ks] f a b c] [m [k & ks] f a b c & args])
m f => {(f k) v ...} Given a map m and a function f of 1-argument, returns a new map whose keys are the result of applyi...
function([m f])
m f => {k (f v) ...} Given a map m and a function f of 1-argument, returns a new map where the keys of m are mapped to r...
function([m f])
Returns true x is a goog.Uri instance.
function([x])
Like require, but referring vars specified by the mandatory :only option. Example: The following would load the librar...
macro([& args])
Similar to use but only for macros.
macro([& args])
Returns a UUID consistent with the string s.
function([s])
Return true if x is a UUID.
function([x])
V
- value
([mseq _meta])
- value
([val sym _meta])
- value
([meta array __hash])
- value
- function
([xs])
- value
([arr i])
- value
([meta array __hash])
- value
([arr i])
- value
([edit arr])
- value
([state])
Returns the value in the map entry.
function([map-entry])
Returns a sequence of the map's values, in the same order as (seq map).
function([map])
The symbol must resolve to a var, and the Var object itself (not its value) is returned. The reader macro #'x expands to...
special-form([symbol])
Returns true if v is of type cljs.core.Var
function([v])
Returns an object of the same type and value as obj, with (apply f (meta obj) args) as its metadata.
function([obj f] [obj f a] [obj f a b] [obj f a b c] [obj f a b c d] [obj f a b c d & args])
Creates a new vector containing the contents of coll. JavaScript arrays will be aliased and should not be modified.
function([coll])
:lite-mode version of vec, not intended to be used directly.
function([coll])
Creates a new vector containing the args.
macro([& args])
:lite-mode version of vector, not intended to be used directly.
function([& args])
- function
([v offset])
Return true if x satisfies IVector
function([x])
Creates and returns a Volatile with an initial value of val.
function([val])
Returns true if x is a volatile.
function([x])
Sets the value of volatile to newval without regard for the current value. Returns newval.
function([vol newval])
Non-atomically swaps the value of the volatile as if: (apply f current-value-of-vol args). Returns the value that was sw...
macro([vol f & args])
W
Evaluates test. If logical true, evaluates body in an implicit do.
macro([test & body])
bindings => x xs Roughly the same as (when (seq xs) (let [x (first xs)] body)) but xs is evaluated only once
macro([bindings & body])
bindings => binding-form test When test is true, evaluates body with binding-form bound to the value of test
macro([bindings & body])
Evaluates test. If logical false, evaluates body in an implicit do.
macro([test & body])
bindings => binding-form test When test is not nil, evaluates body with binding-form bound to the value of test
macro([bindings & body])
Repeatedly executes body while test expression is true. Presumes some side-effect will cause test to become false/nil. R...
macro([test & body])
Returns an object of the same type and value as obj, with map m as its metadata.
function([o meta])
Evaluates exprs in a context in which *print-fn* is bound to .append on a fresh StringBuffer. Returns the string create...
macro([& body])
binding => var-symbol temp-value-expr Temporarily redefines vars while executing the body. The temp-value-exprs will b...
macro([bindings & body])
- function
([writer & ss])