Liking cljdoc? Tell your friends :D

clj-toolbox.colls

Functions for manipulating and traversing collections

Functions for manipulating and traversing collections
raw docstring

any-in?clj

(any-in? pred coll)

Returns true if (pred x) is logical true for any x in coll, else false.

Returns true if (pred x) is logical true for any x in coll, else false.
sourceraw docstring

find-firstclj

(find-first pred coll)

Returns the first x in coll for which (pred x) returns true. returns nil if none is found

Returns the first x in coll for which (pred x) returns true.
returns nil if none is found
sourceraw docstring

into-mapclj

(into-map coll)
(into-map kf coll)
(into-map kf vf coll)

Transforms coll into a hash-map by using (kf x) as the key and (vf x) as the value for each x in coll vf defaults to identity if not provided if only coll is provided, will assume coll is a list of pairs

Transforms coll into a hash-map by using (kf x) as the key and (vf x) as the value for each x in coll
vf defaults to identity if not provided
if only coll is provided, will assume coll is a list of pairs
sourceraw docstring

not-empty?clj

(not-empty? x)

Returns true if x is not empty, else false.

Exists because doing (not (empty? x)) is inefficient

Returns true if x is not empty, else false.

Exists because doing (not (empty? x)) is inefficient
sourceraw docstring

strict-partitionclj

(strict-partition n coll)

Like parition, but throws an exception if the number of elements in coll are not evenly divisible by n, instead of partition's behavior of having the last group be too small.

Like parition, but throws an exception if the number of elements in coll
are not evenly divisible by n, instead of partition's behavior of having
the last group be too small.
sourceraw docstring

take-rangeclj

(take-range start end coll)

Returns the part of the coll from index start (inclusive) to end (exclusive).

Returns the part of the coll from index start (inclusive) to end (exclusive).
sourceraw docstring

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

× close