function | since v0.0-927 | clojure.set/subset? | Edit |
(subset? set1 set2)
Returns true if a
is a subset of b
, false otherwise.
In other words, returns true if all the elements of a
can be found in b
.
Is set1 a subset of set2?
(defn subset?
[set1 set2]
(and (<= (count set1) (count set2))
(every? #(contains? set2 %) set1)))