Clojure - Sets
Sets in Clojure are a set of unique values. Sets are created in Clojure with the help of the set command.
Following is an example of the creation of sets in Clojure.Live Demo
(ns clojure.examples.example (:gen-class)) (defn example  (println (set '(1 1 2 2)))) (example)
The above code produces the following output.
Following are the methods available in Clojure for sets.
|Sr.No.||Sets & Description|
Returns a sorted set of elements.
Returns the element at the index position.
Finds out whether the set contains a certain element or not.
Appends an element to the set and returns the new set of elements.
Disjoins an element from the set.
Return a set that is the union of the input sets
Return a set that is the first set without elements of the remaining sets.
Return a set that is the intersection of the input sets.
Is set1 a subset of set2?
Is set1 a superset of set2?