API for clojure.set
-
by Rich Hickey
Full namespace name:
clojure.set
Overview
Set operations such as union/intersection.
Public Variables and Functions
difference
function
Usage: (difference s1)
(difference s1 s2)
(difference s1 s2 & sets)
Return a set that is the first set without elements of the remaining sets
Source
index
function
Usage: (index xrel ks)
Returns a map of the distinct values of ks in the xrel mapped to a
set of the maps in xrel with the corresponding values of ks.
Source
intersection
function
Usage: (intersection s1)
(intersection s1 s2)
(intersection s1 s2 & sets)
Return a set that is the intersection of the input sets
Source
join
function
Usage: (join xrel yrel)
(join xrel yrel km)
When passed 2 rels, returns the rel corresponding to the natural
join. When passed an additional keymap, joins on the corresponding
keys.
Source
map-invert
function
Usage: (map-invert m)
Returns the map with the vals mapped to the keys.
Source
project
function
Usage: (project xrel ks)
Returns a rel of the elements of xrel with only the keys in ks
Source
rename
function
Usage: (rename xrel kmap)
Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap
Source
rename-keys
function
Usage: (rename-keys map kmap)
Returns the map with the keys in kmap renamed to the vals in kmap
Source
select
function
Usage: (select pred xset)
Returns a set of the elements for which pred is true
Source
union
function
Usage: (union)
(union s1)
(union s1 s2)
(union s1 s2 & sets)
Return a set that is the union of the input sets
Source