useful functions that have not found a proper place yet
useful functions that have not found a proper place yet
(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))
(map-vals f)
(map-vals f coll)
map over values ONLY
map over values ONLY
(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
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close