Liking cljdoc? Tell your friends :D

Clojure only.

Functions that operate on Clojure sequences.

Functions that operate on Clojure sequences.

`(any? pred coll)`

Returns true if some element in coll matches the pred

Returns true if some element in coll matches the pred

`(butlastv v)`

Like (vec (butlast v))' but efficient for vectors

Like (vec (butlast v))' but efficient for vectors

`(count-occurences matching-fn strings-to-match search-terms)`

`(distinct-by keyfn coll)`

`(distinct-by keyfn max-n coll)`

Like distinct, but calls keyfn to determine distinctness, much like sort-by. Takes an optional max-n, indicating how many duplicates are acceptible.

Like distinct, but calls keyfn to determine distinctness, much like sort-by. Takes an optional max-n, indicating how many duplicates are acceptible.

`(doseq-indexed index-sym [item-sym coll] & body)`

`(ensure-sequential x)`

Returns x as [x] if x is not sequential, otherwise return x untouched.

Returns x as [x] if x is not sequential, otherwise return x untouched.

`(frequencies-by keyfn coll)`

Like frequencies, but calls keyfn to check for frequency

Like frequencies, but calls keyfn to check for frequency

`(indexed s)`

Returns a lazy sequence of [index, item] pairs, where items come from 's' and indexes count up from zero.

(indexed '(a b c d)) => ([0 a] [1 b] [2 c] [3 d])

Returns a lazy sequence of [index, item] pairs, where items come from 's' and indexes count up from zero. (indexed '(a b c d)) => ([0 a] [1 b] [2 c] [3 d])

`(map-all f & colls)`

`(map-nth f n coll)`

`(max-by sort-by-fn xs)`

Like max, but the comparator is customizable through sort-by-fn

Like max, but the comparator is customizable through sort-by-fn

`(min-by sort-by-fn xs)`

Like min, but the comparator is customizable through sort-by-fn

Like min, but the comparator is customizable through sort-by-fn

`(only coll)`

Gives the sole element of a sequence

Gives the sole element of a sequence

`(rand-take coll n)`

Randomly takes at most n elements from coll

Randomly takes at most n elements from coll

`(realize x)`

Fully realize the specified collection(could be nested)

Fully realize the specified collection(could be nested)

`(realized-lazy-seq? x)`

`(seeded-shuffle seed coll)`

`(segregate pred coll)`

Splits the collection into two collections of the same type. The first collection contains all elements that pass the predicate and the second collection all the items that fail the predicate.

Splits the collection into two collections of the same type. The first collection contains all elements that pass the predicate and the second collection all the items that fail the predicate.

`(seq-to-map coll)`

Transforms a seq of ([key1 value1] [key2 value2]) pairs to a map {key1 value1 key2 value2}. For empty and nil values, returns nil.

Transforms a seq of ([key1 value1] [key2 value2]) pairs to a map {key1 value1 key2 value2}. For empty and nil values, returns nil.

`(zip seqs)`

[[:a 1] [:b 2] [:c 3]] ;=> [[:a :b :c] [1 2 3]]

[[:a 1] [:b 2] [:c 3]] ;=> [[:a :b :c] [1 2 3]]

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