Functions for working with sets.
Functions for working with sets.
(contains-all? s other)
True if this set contains all keys in the given map or set.
True if this set contains all keys in the given map or set.
(contains-any? s other)
True if this set contains any keys in the given map or set.
True if this set contains any keys in the given map or set.
(difference a b)
Subtracts all elements of b from a.
Subtracts all elements of b from a.
(elements s)
A list of all elements in the set.
A list of all elements in the set.
(index-of xs x)
Returns a the index of the given element in the set, or nil if it's absent.
Returns a the index of the given element in the set, or nil if it's absent.
(intersection a b)
Takes the intersection of sets a and b.
Takes the intersection of sets a and b.
(remove xs x)
Removes an element from the set.
Removes an element from the set.
(set)
(set hash-fn equals-fn)
Constructs a new Set. Optionally takes a function for hashing and a functionf or equality.
Constructs a new Set. Optionally takes a function for hashing and a functionf or equality.
(value-equality s)
The equality semantics used by the set
The equality semantics used by the set
(value-hash s)
The hash function used by the set
The hash function used by the set
(zip xs f)
Constructs a map which has a corresponding value (f x) for each x in the set xs.
Constructs a map which has a corresponding value (f x) for each x in the set xs.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close