(all-after item coll)
Returns a new collection of all items after item
in original coll
.
If coll
is a vector, the new collection is created with subvec
.
Returns original coll if item isn't found.
Returns a new collection of all items after `item` in original `coll`. If `coll` is a vector, the new collection is created with `subvec`. Returns original coll if item isn't found.
(append-first xs)
(apply-to-keys type keys f & args)
Applies f
with args
to all given keys
in type
.
Applies `f` with `args` to all given `keys` in `type`.
(bisect f coll)
(bisect f f2 coll)
(cartesian-product & seqs)
All the ways to take one item from each sequence (taken from clojure.contrib.combinatorics)
All the ways to take one item from each sequence (taken from clojure.contrib.combinatorics)
(check-intervals & ivals)
(collect-indexed f f2 coll)
(collect-set f coll)
(deep-merge l r)
Merge fn to be used with merge-with
. Recursively merges map
values which are maps or seqs (for the latter into
is used, only
if RHS is seq or set as well). If the RHS value has the metadata key
:replace
set, it is used as new value without merging.
Merge fn to be used with `merge-with`. Recursively merges map values which are maps or seqs (for the latter `into` is used, only if RHS is seq or set as well). If the RHS value has the metadata key `:replace` set, it is used as new value without merging.
(demunge-flags kw xs)
Takes a keyword or string of flags and string/seq of items, returns
map with items as keys and boolean values indicating if an item has
been found in the string representation of the kw. If kw
is nil,
returns nil.
(demunge-flags :cad "abcd")
#_=> {:a true :b false :c true :d true}
Takes a keyword or string of flags and string/seq of items, returns map with items as keys and boolean values indicating if an item has been found in the string representation of the kw. If `kw` is nil, returns nil. (demunge-flags :cad "abcd") #_=> {:a true :b false :c true :d true}
(demunge-flags-seq kw xs)
Like demunge-flags
but returns lazyseq of booleans in same order as xs.
(demunge-flags-seq :cad "abcd") => [true false true true]
Like `demunge-flags` but returns lazyseq of booleans in same order as xs. (demunge-flags-seq :cad "abcd") => [true false true true]
(filter-tree f root)
Applies f
to root coll and every of its (nested) elements. Returns
a vector of items for which f
returned a truthy value.
Applies `f` to root coll and every of its (nested) elements. Returns a vector of items for which `f` returned a truthy value.
(index i t)
(index! i t)
(index-kv m k v)
(index-kv! m k v)
(index-of coll item)
(interval-set & ivals)
(iterate-n n f x)
Iteratively applies f to x, n times, then returns result.
Iteratively applies f to x, n times, then returns result.
(iterate-while pred f x)
(merge-deep a b)
(merge-deep a b & maps)
Calls merge-with
using deep-merge
as merge fn.
Calls `merge-with` using `deep-merge` as merge fn.
(neighbors x coll)
(postwalk f form)
(reduce-pairs f1 f2 coll)
(reduce-pairs f1 f2 acc coll)
(rotate-left n xs)
(stringify-keys m)
(successive-nth n coll)
(successive-nth n step coll)
Returns a lazyseq of n
-element vectors, each one containing
a successive elements of the original collection.
(successive-nth 3 [1 2 3 4])
=> ([1 2 3] [2 3 4] [3 4 5])
Returns a lazyseq of `n`-element vectors, each one containing a successive elements of the original collection. (successive-nth 3 [1 2 3 4]) => ([1 2 3] [2 3 4] [3 4 5])
(successive-nth-indexed n coll)
(successive-nth-indexed n idx coll)
Returns a lazyseq of nested 2-element vectors, each one containing
a vector of n
successive elements of the original collection and
an sequence index.
(successive-nth-indexed 2 [10 20 30 40])
=> ([[10 20] 0] [[20 30] 1] [[30 40] 2])
Returns a lazyseq of nested 2-element vectors, each one containing a vector of `n` successive elements of the original collection and an sequence index. (successive-nth-indexed 2 [10 20 30 40]) => ([[10 20] 0] [[20 30] 1] [[30 40] 2])
(unwrap-str s n)
(value-set idx v)
(value-set f idx v)
(walk inner outer form)
(wrap-seq s head tail)
(wrap-str s pre post)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close