Type System
Coerce to boolean
functioncljs.core
- macro
cljs.core
- macro
cljs.core
- macro
cljs.core
Coerce to int.
macrocljs.core
Coerce to long. Identical to `int'.
functioncljs.core
- macro
cljs.core
- macro
cljs.core
- macro
cljs.core
- macro
cljs.core
- macro
cljs.core
Coerce to int.
functioncljs.core
Coerce to long. Identical to `int'.
functioncljs.core
- macro
cljs.core
General
80takes a regex op re, and predicates. Returns a regex-op that consumes input as per re but subjects the resulting value t...
macrocljs.spec.alpha
Returns a regex op that matches zero or more values matching pred. Produces a vector of matches iff there is at least on...
macrocljs.spec.alpha
- value
cljs.spec.alpha
- value
cljs.spec.alpha
If true, compiler will enable spec asserts, which are then subject to runtime control via check-asserts? If false, compi...
valuecljs.spec.alpha
- value
cljs.spec.alpha
- value
cljs.spec.alpha
- value
cljs.spec.alpha
Returns a regex op that matches one or more values matching pred. Produces a vector of matches
macrocljs.spec.alpha
Returns a regex op that matches zero or one value matching pred. Produces a single value (not a collection) if matched.
macrocljs.spec.alpha
- value
cljs.spec.alpha
- protocol
cljs.spec.alpha
- protocol
cljs.spec.alpha
- function
cljs.spec.alpha
Takes key+pred pairs, e.g. (s/alt :even even? :small #(< % 42)) Returns a regex op that returns a map entry containing...
macrocljs.spec.alpha
Returns the immediate and indirect parents of tag, either via a JavaScript type inheritance relationship or a relationsh...
functioncljs.core
Takes predicate/spec-forms, e.g. (s/and even? #(< % 42)) Returns a spec that returns the conformed value. Successive c...
macrocljs.spec.alpha
spec-checking assert expression. Returns x if x is valid? according to spec, else throws an error with explain-data plus...
macrocljs.spec.alpha
Do not call this directly, use 'assert'.
functioncljs.spec.alpha
Takes key+pred pairs, e.g. (s/cat :e even? :o odd?) Returns a regex op that matches (all) values in sequence, returnin...
macrocljs.spec.alpha
Enable or disable spec asserts that have been compiled with '*compile-asserts*' true. See 'assert'. Initially set to bo...
functioncljs.spec.alpha
Returns the value set by check-asserts.
functioncljs.spec.alpha
Returns a spec for a collection of items satisfying pred. Unlike generator will fill an empty init-coll. Same options a...
macrocljs.spec.alpha
Given a spec and a value, returns :cljs.spec.alpha/invalid if value does not match spec, else the (possibly destructured...
functioncljs.spec.alpha
takes a predicate function with the semantics of conform i.e. it should return either a (possibly converted) value or :c...
macrocljs.spec.alpha
Given a namespace-qualified keyword or resolveable symbol k, and a spec, spec-name, predicate or regex-op makes an entry...
macrocljs.spec.alpha
Creates and installs a new method of multimethod associated with dispatch-value.
macrocljs.core
Creates a new multimethod with the associated dispatch function. The docstring and attribute-map are optional. Options ...
macrocljs.core
A protocol is a named set of named methods and their signatures: (defprotocol AProtocolName ;optional doc string "A...
macrocljs.core
Establishes a parent/child relationship between parent and tag. Parent must be a namespace-qualified symbol or keyword a...
functioncljs.core
Returns the immediate and indirect children of tag, through a relationship established via derive. h must be a hierarchy...
functioncljs.core
returns an abbreviated description of the spec as data
functioncljs.spec.alpha
Specs a 64-bit floating point number. Options: :infinite? - whether +/- infinity allowed (default true) :NaN? - ...
macrocljs.spec.alpha
takes a pred and validates collection elements against that pred. Note that 'every' does not do exhaustive checking, ra...
macrocljs.spec.alpha
like 'every' but takes separate key and val preds and works on associative collections. Same options as 'every', :into ...
macrocljs.spec.alpha
generates a number (default 10) of values compatible with spec and maps conform over them, returning a sequence of [val ...
functioncljs.spec.alpha
exercises the fn named by sym (a symbol) by applying it to n (default 10) generated samples of its args spec. When fspec...
macrocljs.spec.alpha
Given a spec and a value that fails to conform, prints an explanation to *out*.
functioncljs.spec.alpha
Given a spec and a value x which ought to conform, returns nil if x conforms, else a map with at least the key ::problem...
functioncljs.spec.alpha
- function
cljs.spec.alpha
Prints explanation data (per 'explain-data') to *out* using the printer in *explain-out*, by default explain-printer.
functioncljs.spec.alpha
Default printer for explain-data. nil indicates a successful validation.
functioncljs.spec.alpha
Given a spec and a value that fails to conform, returns an explanation as a string.
functioncljs.spec.alpha
Useful when you want to provide several implementations of the same protocol all at once. Takes a single protocol and th...
macrocljs.core
Extend a type to a series of protocols. Useful when you are supplying the definitions explicitly inline. Propagates the ...
macrocljs.core
Takes a symbol naming a function, and one or more of the following: :args A regex spec for the function arguments as th...
macrocljs.spec.alpha
- function
cljs.spec.alpha
returns the spec as data
functioncljs.spec.alpha
takes :args :ret and (optional) :fn kwargs whose values are preds and returns a spec whose conform/explain take a fn and...
macrocljs.spec.alpha
Given a spec, returns the generator for it, or throws if none can be constructed. Optionally an overrides map can be pro...
functioncljs.spec.alpha
Given a multimethod and a dispatch value, returns the dispatch fn that would apply to that value, or nil if none apply a...
functioncljs.core
Returns spec registered for keyword/symbol/var k, or nil.
functioncljs.spec.alpha
Returns a spec that validates insts in the range from start (inclusive) to end (exclusive).
macrocljs.spec.alpha
Return true if inst at or after start and before end
functioncljs.spec.alpha
Returns a spec that validates fixed precision integers in the range from start (inclusive) to end (exclusive).
macrocljs.spec.alpha
Return true if start <= val, val < end and val is a fixed precision integer.
functioncljs.spec.alpha
tests the validity of a conform return value
functioncljs.spec.alpha
Creates and returns a map validating spec. :req and :opt are both vectors of namespaced-qualified keywords. The validato...
macrocljs.spec.alpha
takes the same arguments as spec/keys and returns a regex op that matches sequences of key/values, converts them into a ...
macrocljs.spec.alpha
Creates a hierarchy object for use with derive, isa? etc.
functioncljs.core
Returns a spec for a map whose keys satisfy kpred and vals satisfy vpred. Unlike 'every-kv', map-of will exhaustively co...
macrocljs.spec.alpha
Takes map-validating specs (e.g. 'keys' specs) and returns a spec that returns a conformed map satisfying all of the spe...
macrocljs.spec.alpha
Given a multimethod, returns a map of dispatch values -> dispatch fns
functioncljs.core
Takes the name of a spec/predicate-returning multimethod and a tag-restoring keyword or fn (retag). Returns a spec that...
macrocljs.spec.alpha
returns a spec that accepts nil and values satisfiying pred
macrocljs.spec.alpha
takes a spec and returns a spec that has the same properties except 'conform' returns the original (not the conformed) v...
functioncljs.spec.alpha
Takes key+pred pairs, e.g. (s/or :even even? :small #(< % 42)) Returns a destructuring spec that returns a map entry c...
macrocljs.spec.alpha
Returns the immediate parents of tag, either via a JavaScript type inheritance relationship or a relationship establishe...
functioncljs.core
Causes the multimethod to prefer matches of dispatch-val-x over dispatch-val-y when there is a conflict
functioncljs.core
returns x if x is a (cljs.spec.alpha) regex op, else logical false
functioncljs.spec.alpha
returns the registry map, prefer 'get-spec' to lookup a spec by name
functioncljs.spec.alpha
- value
cljs.spec.alpha
Takes a single predicate form, e.g. can be the name of a predicate, like even?, or a fn literal like #(< % 42). Note tha...
macrocljs.spec.alpha
returns x if x is a spec object, else logical false
functioncljs.spec.alpha
- function
cljs.spec.alpha
takes one or more preds and returns a spec for a tuple, a vector where each element conforms to the corresponding pred. ...
macrocljs.spec.alpha
Removes a parent/child relationship between parent and tag. h must be a hierarchy obtained from make-hierarchy, if not s...
functioncljs.core
Given a spec and a value created by or compliant with a call to 'conform' with the same spec, returns a value with all c...
functioncljs.spec.alpha
Helper function that returns true when x is valid for spec.
functioncljs.spec.alpha
Takes a spec and a no-arg, generator-returning fn and returns a version of that spec that uses that generator
functioncljs.spec.alpha
Returns true if num is NaN, else false
functioncljs.core
Returns true if given any argument.
functioncljs.core
Returns true if coll implements IAssociative
functioncljs.core
Returns the immediate prototype of c
functioncljs.core
Return true if x is a Boolean
functioncljs.core
Returns true if x is a JavaScript string of length one.
functioncljs.core
Return true if x satisfies IChunkedSeq.
functioncljs.core
Returns true if coll implements count in constant time
functioncljs.core
Returns true for JavaScript numbers, false otherwise.
functioncljs.core
Returns true if n is even, throws an exception if n is not an integer
functioncljs.core
Returns true if x is the value false, false otherwise.
macrocljs.core
Returns true for JavaScript numbers, false otherwise.
functioncljs.core
Return true if f is a JavaScript function or satisfies the Fn protocol.
functioncljs.core
Return true if x is a symbol or keyword
functioncljs.core
Tests if 2 arguments are the same object
macrocljs.core
Returns true if f returns true for fn? or satisfies IFn.
functioncljs.core
Returns true if coll implements nth in constant time
functioncljs.core
Returns true for Infinity and -Infinity values.
functioncljs.core
Return true if x satisfies Inst
functioncljs.core
Evaluates x and tests if it is an instance of the type c. Returns true or false
macrocljs.core
Return true if x satisfies integer? or is an instance of goog.math.Integer or goog.math.Long.
functioncljs.core
Returns true if n is a JavaScript number with no decimal part.
functioncljs.core
Returns true if (= child parent), or child is directly or indirectly derived from parent, either via a JavaScript type i...
functioncljs.core
Return true if x is a Keyword
macrocljs.core
Returns true if x implements IList
functioncljs.core
Returns true if x satisfies IMapEntry
functioncljs.core
Return true if x satisfies IMap
functioncljs.core
Return true if x satisfies int? and is a natural integer value.
functioncljs.core
Return true if x satisfies int? and is negative.
functioncljs.core
Returns true if num is less than zero, else false
macrocljs.core
Returns true if x is nil, false otherwise.
macrocljs.core
Returns true if x is a JavaScript number.
macrocljs.core
Returns true if n is odd, throws an exception if n is not an integer
functioncljs.core
Return true if x satisfies int? and is positive.
functioncljs.core
Returns true if num is greater than zero, else false
macrocljs.core
Return true if x is a symbol or keyword with a namespace
functioncljs.core
Return true if x is a keyword with a namespace
functioncljs.core
Return true if x is a symbol with a namespace
functioncljs.core
Returns true if a value has been produced for a delay or lazy sequence.
functioncljs.core
Return true if x satisfies IRecord
functioncljs.core
Returns true if coll satisfies? IReversible.
functioncljs.core
Returns true if x satisfies the protocol
macrocljs.core
Return true if s satisfies ISeq
functioncljs.core
Return true if the seq function is supported for s
functioncljs.core
Returns true if coll satisfies ISequential
functioncljs.core
Returns true if x satisfies ISet
functioncljs.core
Return true if x is a symbol or keyword without a namespace
functioncljs.core
Return true if x is a keyword without a namespace
functioncljs.core
Return true if x is a symbol without a namespace
functioncljs.core
Returns true if x is not nil, false otherwise.
macrocljs.core
Returns true if coll satisfies ISorted
functioncljs.core
Returns true if x names a special form
functioncljs.core
Returns true if x is a JavaScript string.
macrocljs.core
Returns the immediate and indirect prototypes of c, if any
functioncljs.core
Return true if x is a Symbol
macrocljs.core
Returns true if x is the value true, false otherwise.
macrocljs.core
Return x's constructor.
functioncljs.core
Returns true x is a goog.Uri instance.
functioncljs.core
Return true if x is a UUID.
functioncljs.core
Returns true if v is of type cljs.core.Var
functioncljs.core
Return true if x satisfies IVector
functioncljs.core
Returns true if x is a volatile.
functioncljs.core
Returns true if num is zero, else false
macrocljs.core