(all-subsets s)
finds all non-empty sets of collection s
(all-subsets [1 2 3]) => [#{1} #{2} #{3} #{1 2} #{1 3} #{2 3} #{1 2 3}]
finds all non-empty sets of collection `s` (all-subsets [1 2 3]) => [#{1} #{2} #{3} #{1 2} #{1 3} #{2 3} #{1 2 3}]
(assignable? current base)
checks whether a class is assignable to another in sequence (assignable? [String] [CharSequence]) => true
(assignable? [String Integer Long] [CharSequence Number Number]) => true
(assignable? [CharSequence] [String]) => false
checks whether a class is assignable to another in sequence (assignable? [String] [CharSequence]) => true (assignable? [String Integer Long] [CharSequence Number Number]) => true (assignable? [CharSequence] [String]) => false
(combinations k l)
find all combinations of k
in a given input list l
(combinations 2 [1 2 3]) => [[2 1] [3 1] [3 2]]
(combinations 3 [1 2 3 4]) => [[3 2 1] [4 2 1] [4 3 1] [4 3 2]]
find all combinations of `k` in a given input list `l` (combinations 2 [1 2 3]) => [[2 1] [3 1] [3 2]] (combinations 3 [1 2 3 4]) => [[3 2 1] [4 2 1] [4 3 1] [4 3 2]]
(context-class obj)
If x is a class, return x otherwise return the class of x
(context-class String) => String
(context-class "") => String
If x is a class, return x otherwise return the class of x (context-class String) => String (context-class "") => String
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close