(all-some? xseq)
Given seq as xseq returns true if all its items are not nils, otherwise false
Given seq as xseq returns true if all its items are not nils, otherwise false
(assoc-some m & kvs)
Like assoc but only assocs when value is non-nil.
Like assoc but only assocs when value is non-nil.
(assoc-when m & kvs)
Like assoc but only assocs when value is truthy.
Like assoc but only assocs when value is truthy.
(conj-when coll x)
(conj-when coll x & xs)
Like conj but ignores non-truthy values.
Like conj but ignores non-truthy values.
(dissoc-in m [k & ks])
Dissociate this keyseq from m, removing any empty maps created as a result (including at the top-level).
Dissociate this keyseq from m, removing any empty maps created as a result (including at the top-level).
(dissoc-when m korks)
(dissoc-when m korks pred)
Dissoc from `korks' when the value is falsy, or when the optionally supplied predicate produces a falsy value when invoked on the value.
Dissoc from `korks' when the value is falsy, or when the optionally supplied predicate produces a falsy value when invoked on the value.
(distinct-by f xs)
Returns elements of xs which return unique values according to f. If multiple elements of xs return the same value under f, the first is returned
Returns elements of xs which return unique values according to f. If multiple elements of xs return the same value under f, the first is returned
(find-by pred coll)
Return the first element in coll
matching pred
; otherwise nil.
Return the first element in `coll` matching `pred`; otherwise nil.
(remove-at v i)
Remove element at index i
from vector v
.
Remove element at index `i` from vector `v`.
(str->int s)
(str->int m & ks)
Converts a string to an integer. If the input is already a number, returns the input.
Converts a string to an integer. If the input is already a number, returns the input.
(strip-namespaces m)
Remove all namespaces from keyword keys.
Remove all namespaces from keyword keys.
(transform-when-key-exists source transformations)
(transform-when-key-exists {:a 1 :b 2} {:a #(inc %) :c #(inc %)})
=> {:a 2 :b 2}
(transform-when-key-exists {:a 1 :b 2} {:a #(inc %) :c #(inc %)}) => {:a 2 :b 2}
(update-in-some m key-seq f & args)
Like update-in but returns m unchanged if key-seq is not nil.
Like update-in but returns m unchanged if key-seq is not nil.
(update-in-when m key-seq f & args)
Like update-in but returns m unchanged if key-seq is not present.
Like update-in but returns m unchanged if key-seq is not present.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close