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?
sourceraw docstring

box-trimclj

Copied from clj-toolbox.strings/box-trim


Copied from clj-toolbox.strings/box-trim
sourceraw 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?
sourceraw 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
sourceraw 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
sourceraw 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?
sourceraw 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
sourceraw 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
sourceraw 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?
sourceraw docstring

split-whitespaceclj

Copied from clj-toolbox.strings/split-whitespace


Copied from clj-toolbox.strings/split-whitespace
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw docstring

take-rangeclj

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

Copied from clj-toolbox.colls/take-range

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


Copied from clj-toolbox.colls/take-range
sourceraw 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
sourceraw 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!
sourceraw docstring

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

× close