Liking cljdoc? Tell your friends :D

hiposfer.kamal.libs.tool

useful functions that have not found a proper place yet

useful functions that have not found a proper place yet
raw docstring

assertclj

(assert m spec)

checks that m conforms to spec. Returns an error message on error or nil otherwise

checks that m conforms to spec. Returns an error message on error or nil
otherwise
sourceraw docstring

coerceclj

(coerce m coercers)

takes a map and a mapping of keyword to a 1 argument function. Recursively transforms m by updating its value through the passed functions. Non existent values are ignored

takes a map and a mapping of keyword to a 1 argument function. Recursively
transforms m by updating its value through the passed functions. Non existent
values are ignored
sourceraw docstring

combinationsclj

(combinations n coll)

returns a lazy sequence of all the possible combinations of the elements in coll in groups of n members. Example: (combinations 2 [:a :b :c]) ;;=> ((:a :b) (:a :c) (:b :c))

returns a lazy sequence of all the possible combinations of the elements in
coll in groups of n members.
Example: (combinations 2 [:a :b :c]) ;;=> ((:a :b) (:a :c) (:b :c))
sourceraw docstring

jsonistaclj

(jsonista value)

returns a string representation of Java objects or the object itself otherwise

returns a string representation of Java objects or the object itself otherwise
sourceraw docstring

map-valsclj

(map-vals f)
(map-vals f coll)

map over values ONLY

map over values ONLY
sourceraw docstring

someclj

(some pred? coll)

an alternative version of Clojure's some which uses reduce instead of recur. Useful for collections that know how to reduce themselves faster than first/next

Returns the value that caused (pred? value) to be true; as opposed to Clojure's

an alternative version of Clojure's some which uses reduce instead of
recur. Useful for collections that know how to reduce themselves faster
than first/next

Returns the value that caused (pred? value) to be true; as opposed to Clojure's
sourceraw docstring

uniqueclj

(unique)
(unique coll)

Returns a lazy sequence of the elements of coll with duplicates removed. Returns a stateful transducer when no collection is provided.

Returns a lazy sequence of the elements of coll with duplicates removed.
Returns a stateful transducer when no collection is provided.
sourceraw docstring

unique-byclj

(unique-by pred)
(unique-by attr coll)

Returns a lazy sequence of the elements of coll with duplicates attributes removed. Returns a stateful transducer when no collection is provided.

Returns a lazy sequence of the elements of coll with duplicates attributes removed.
Returns a stateful transducer when no collection is provided.
sourceraw docstring

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

× close