You're viewing version 1.2.0 of superset?. The latest stable version of Clojure Core is 1.3.0.
1.2.0 Arrow_down_16x16

superset?

clojure.set

  • (superset? set1 set2)
Is set1 a superset of set2?

1 Example top

  • (use '[clojure.set :only [superset?]])
    
    user=> (superset? #{0} #{0})
    true
    
    user=> (superset? #{0 1} #{0})
    true
    
    user=> (superset? #{0} #{0 1}) 
    false
    
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/set.clj:150 top

(defn superset? 
  "Is set1 a superset of set2?"
  {:added "1.2",
   :tag Boolean}
  [set1 set2]
  (and (>= (count set1) (count set2))
       (every? set1 set2)))
Vars in clojure.set/superset?: >= and count defn every?
Used in 0 other vars

Comments top

No comments for superset?. Log in to add a comment.