Liking cljdoc? Tell your friends :D

clj-fast.clojure.core


assocclj

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

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

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

assoc-inclj

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

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

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

defncljmacro

(defn name doc-string? attr-map? [params*] prepost-map? body)
(defn name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?)

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

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

defn-cljmacro

(defn- name & decls)

same as defn, yielding non-public def

same as defn, yielding non-public def
sourceraw docstring

destructureclj

(destructure bindings)
source

fncljmacro

(fn & sigs)

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

Defines a function

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

Defines a function
sourceraw docstring

getclj

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

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

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

get-inclj

(get-in m ks)
(get-in m ks not-found)

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

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

letcljmacro

(let bindings & body)

binding => binding-form init-expr

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

binding => binding-form init-expr

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

loopcljmacro

(loop bindings & body)

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

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

mergeclj

(merge & maps)

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

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

nthclj

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

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

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

select-keysclj

(select-keys map keyseq)

Returns a map containing all the values of the selected keys when a resolvable sequence is supplied, otherwise, a containing only those entries in map whose key is in keys

Returns a map containing all the values of the selected keys when a
resolvable sequence is supplied, otherwise, a containing only those
entries in map whose key is in keys
sourceraw docstring

update-inclj

(update-in m ks f & args)

'Updates' a value in a nested associative structure, where ks is a sequence of keys and f is a function that will take the old value and any supplied args and return the new value, and returns a new nested structure. If any levels do not exist, hash-maps will be created.

'Updates' a value in a nested associative structure, where ks is a
sequence of keys and f is a function that will take the old value
and any supplied args and return the new value, and returns a new
nested structure.  If any levels do not exist, hash-maps will be
created.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close