Liking cljdoc? Tell your friends :D

clodash.seq

Functions that operate on Clojure sequences.

Functions that operate on Clojure sequences.
raw docstring

any?clj

(any? pred coll)

Returns true if some element in coll matches the pred

Returns true if some element in coll matches the pred
raw docstring

butlastvclj

(butlastv v)

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

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

count-exact-occurencesclj


count-matching-occurencesclj


count-occurencesclj

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

distinct-byclj

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

doseq-indexedcljmacro

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

ensure-sequentialclj

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

frequencies-byclj

(frequencies-by keyfn coll)

Like frequencies, but calls keyfn to check for frequency

Like frequencies, but calls keyfn to check for frequency
raw docstring

indexedclj

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

map-allclj

(map-all f & colls)

map-nthclj

(map-nth f n coll)

max-byclj

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

min-byclj

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

onlyclj

(only coll)

Gives the sole element of a sequence

Gives the sole element of a sequence
raw docstring

rand-takeclj

(rand-take coll n)

Randomly takes at most n elements from coll

Randomly takes at most n elements from coll
raw docstring

realizeclj

(realize x)

Fully realize the specified collection(could be nested)

Fully realize the specified collection(could be nested)
raw docstring

realized-lazy-seq?clj

(realized-lazy-seq? x)

seeded-shuffleclj

(seeded-shuffle seed coll)

segregateclj

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

seq-to-mapclj

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

zipclj

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

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

× close