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

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

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 attr)
(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