Liking cljdoc? Tell your friends :D

clj-toolbox.prelude

Functions that should be in clojure.core (or just functions I use very frequently)

Functions that should be in clojure.core (or just functions I use very frequently)
raw docstring

any-in?clj

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

Copied from clj-toolbox.colls/any-in?

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


Copied from clj-toolbox.colls/any-in?
raw docstring

box-trimclj

Copied from clj-toolbox.strings/box-trim


Copied from clj-toolbox.strings/box-trim
raw docstring

derefable?clj

Returns true if x is an instance of clojure.langIDeref

Copied from clj-toolbox.derefs/derefable?

Returns true if x is an instance of clojure.langIDeref

Copied from clj-toolbox.derefs/derefable?
raw docstring

find-firstclj

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

Copied from clj-toolbox.colls/find-first

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


Copied from clj-toolbox.colls/find-first
raw docstring

into-mapclj

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

Copied from clj-toolbox.colls/into-map

  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


Copied from clj-toolbox.colls/into-map
raw docstring

not-empty?clj

Returns true if x is not empty, else false.

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

Copied from clj-toolbox.colls/not-empty?

  Returns true if x is not empty, else false.

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


Copied from clj-toolbox.colls/not-empty?
raw docstring

nowclj

Gets the time in milliseconds since unix epoch as a Long

Copied from clj-toolbox.timetools/now

  Gets the time in milliseconds since unix epoch as a Long


Copied from clj-toolbox.timetools/now
raw docstring

parse-intclj

Shortcut for Integer/parseInt to make it easier to pass around as an argument

Copied from clj-toolbox.maths/parse-int

Shortcut for Integer/parseInt to make it easier to pass around as an argument

Copied from clj-toolbox.maths/parse-int
raw docstring

re-has?clj

Tests whether re matches any part of s. Returns a boolean

Copied from clj-toolbox.strings/re-has?

Tests whether re matches any part of s. Returns a boolean

Copied from clj-toolbox.strings/re-has?
raw docstring

split-whitespaceclj

Copied from clj-toolbox.strings/split-whitespace


Copied from clj-toolbox.strings/split-whitespace
raw docstring

squareclj

Returns the square of a number

Copied from clj-toolbox.maths/square

Returns the square of a number

Copied from clj-toolbox.maths/square
raw docstring

strict-partitionclj

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.

Copied from clj-toolbox.colls/strict-partition

  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.


Copied from clj-toolbox.colls/strict-partition
raw docstring

sumclj

Gets the sum of every element in coll

Copied from clj-toolbox.maths/sum

  Gets the sum of every element in coll


Copied from clj-toolbox.maths/sum
raw docstring

sum-byclj

Gets the sum of (f x) for every x in coll

Copied from clj-toolbox.maths/sum-by

  Gets the sum of (f x) for every x in coll


Copied from clj-toolbox.maths/sum-by
raw docstring

take-rangeclj

Returns the part of the coll from index start to end.

Defaults to start being inclusive and end being exclusive, but can be changed with keyword options.

Copied from clj-toolbox.colls/take-range

  Returns the part of the coll from index start to end.

  Defaults to start being inclusive and end being exclusive, but can be changed with keyword options.


Copied from clj-toolbox.colls/take-range
raw docstring

unlazyclj

Unwraps x if it is a clojure.lang.IDeref. Otherwise just returns x

Copied from clj-toolbox.derefs/unlazy

Unwraps x if it is a clojure.lang.IDeref.
 Otherwise just returns x

Copied from clj-toolbox.derefs/unlazy
raw docstring

update!clj

Like update, but for transients

Copied from clj-toolbox.transients/update!

Like update, but for transients

Copied from clj-toolbox.transients/update!
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close