Liking cljdoc? Tell your friends :D

thi.ng.dstruct.core


all-afterclj/s

(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.
raw docstring

append-firstclj/s

(append-first xs)

apply-to-keysclj/s

(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`.
raw docstring

bisectclj/s

(bisect f coll)
(bisect f f2 coll)

cartesian-productclj/s

(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)
raw docstring

check-intervalsclj/s

(check-intervals & ivals)

collect-indexedclj/s

(collect-indexed f f2 coll)

collect-setclj/s

(collect-set f coll)

deep-mergeclj/s

(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.
raw docstring

demunge-flagsclj/s

(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}
raw docstring

demunge-flags-seqclj/s

(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]
raw docstring

filter-treeclj/s

(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.
raw docstring

indexclj/s

(index i t)

index!clj/s

(index! i t)

index-kvclj/s

(index-kv m k v)

index-kv!clj/s

(index-kv! m k v)

index-ofclj/s

(index-of coll item)

interval-setclj/s

(interval-set & ivals)

iterate-nclj/s

(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.
raw docstring

iterate-whileclj/s

(iterate-while pred f x)

merge-deepclj/s

(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.
raw docstring

neighborsclj/s

(neighbors x coll)

postwalkclj/s

(postwalk f form)

reduce-pairsclj/s

(reduce-pairs f1 f2 coll)
(reduce-pairs f1 f2 acc coll)

rotate-leftclj/s

(rotate-left n xs)

set-conjclj/s


set-conj2*clj/s


stringify-keysclj/s

(stringify-keys m)

successive-nthclj/s

(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])
raw docstring

successive-nth-indexedclj/s

(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])
raw docstring

unwrap-strclj/s

(unwrap-str s n)

value-setclj/s

(value-set idx v)
(value-set f idx v)

vec-conjclj/s


vec-conj2*clj/s


walkclj/s

(walk inner outer form)

wrap-seqclj/s

(wrap-seq s head tail)

wrap-strclj/s

(wrap-str s pre post)

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

× close