clojure.set
clojure.set
完整名称空间名称:clojure.set
概述
Set operations such as union/intersection.
公共变量和函数
差分函数
Usage: (difference s1)
(difference s1 s2)
(difference s1 s2 & sets)
Return a set that is the first set without elements of the remaining sets
在Clojure版本1.0中添加
索引函数
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.
在Clojure版本1.0中添加
相交函数
Usage: (intersection s1)
(intersection s1 s2)
(intersection s1 s2 & sets)
Return a set that is the intersection of the input sets
在Clojure版本1.0中添加
join函数
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.
在Clojure版本1.0中添加
映象反演函数
Usage: (map-invert m)
Returns the map with the vals mapped to the keys.
在Clojure版本1.0中添加
投影函数
Usage: (project xrel ks)
Returns a rel of the elements of xrel with only the keys in ks
在Clojure版本1.0中添加
重命名函数
Usage: (rename xrel kmap)
Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap
在Clojure版本1.0中添加
rename-key函数
Usage: (rename-keys map kmap)
Returns the map with the keys in kmap renamed to the vals in kmap
在Clojure版本1.0中添加
选择函数
Usage: (select pred xset)
Returns a set of the elements for which pred is true
在Clojure版本1.0中添加
subset函数
Usage: (subset? set1 set2)
Is set1 a subset of set2?
在Clojure版本1.2中添加
superset函数
Usage: (superset? set1 set2)
Is set1 a superset of set2?
在Clojure版本1.2中添加
联合函数
Usage: (union)
(union s1)
(union s1 s2)
(union s1 s2 & sets)
Return a set that is the union of the input sets
在Clojure版本1.0中添加