Liking cljdoc? Tell your friends :D

ageneau.utils.core


?assocclj/s

(?assoc m & kvs)

Same as assoc, but skip the assoc if v is nil

Same as assoc, but skip the assoc if v is nil
sourceraw docstring

check-and-throwclj/s

(check-and-throw a-spec db)

Throws an exception if db doesn't match the Spec a-spec.

Throws an exception if `db` doesn't match the Spec `a-spec`.
sourceraw docstring

doto-assertclj/s

(doto-assert x f)
(doto-assert x f message)

Apply f to x and call clojure.core/assert on the result. Return x. Useful as an assertion method within -> threads

Apply f to x and call `clojure.core/assert` on the result. Return x.
Useful as an assertion method within -> threads
sourceraw docstring

hierarchyclj/s

(hierarchy keyseq xs)

Takes a sequence of keys and a sequence of maps. Returns a tree structure as a map where the first level keys are the distinct values mapped to the first element of keyseq and the values are maps containing elements of xs matching that key. The leaves are elements of xs.

Takes a sequence of keys and a sequence of maps.
Returns a tree structure as a map where the first level keys are the distinct
values mapped to the first element of keyseq and the values are maps containing
elements of xs matching that key.
The leaves are elements of xs.
sourceraw docstring

positionsclj/s

(positions pred coll)

Returns a lazy sequence containing the positions at which pred is true for items in coll.

Returns a lazy sequence containing the positions at which pred
is true for items in coll.
sourceraw docstring

remove-nil-valuesclj/s

(remove-nil-values m)

remove all keys with nil values in the map

remove all keys with nil values in the map
sourceraw docstring

rgb-to-hexclj/s

(rgb-to-hex r g b)

convert an r g b color from 8 bit mode to an hex string.

convert an r g b color from 8 bit mode to an hex string.
sourceraw docstring

split-and-reverseclj/s

(split-and-reverse coll n)

Split a sequence at index n and reverse the front and back If n is negative split at index (count coll) + n and reverse front and back.

Split a sequence at index n and reverse the front and back
If n is negative split at index (count coll) + n and reverse front and back.
sourceraw docstring

transform-map-keysclj/s

(transform-map-keys f m)

Recursively transforms all map keys using f as a transformation function.

Recursively transforms all map keys using f as a transformation function.
sourceraw docstring

transform-map-valsclj/s

(transform-map-vals f m)

takes a function of 2 arguments and a map and returns a tranformed map where the values are the result of applying f to the key and value.

takes a function of 2 arguments and a map and returns a tranformed map
where the values are the result of applying f to the key and value. 
sourceraw docstring

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

× close