首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

clojure.set

完整名称空间名称:clojure.set

概述

代码语言:javascript
复制
Set operations such as union/intersection.

公共变量和函数

差分函数

代码语言:javascript
复制
Usage: (difference s1)
       (difference s1 s2)
       (difference s1 s2 & sets)
代码语言:javascript
复制
Return a set that is the first set without elements of the remaining sets

在Clojure版本1.0中添加

索引函数

代码语言:javascript
复制
Usage: (index xrel ks)
代码语言:javascript
复制
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中添加

相交函数

代码语言:javascript
复制
Usage: (intersection s1)
       (intersection s1 s2)
       (intersection s1 s2 & sets)
代码语言:javascript
复制
Return a set that is the intersection of the input sets

在Clojure版本1.0中添加

join函数

代码语言:javascript
复制
Usage: (join xrel yrel)
       (join xrel yrel km)
代码语言:javascript
复制
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中添加

映象反演函数

代码语言:javascript
复制
Usage: (map-invert m)
代码语言:javascript
复制
Returns the map with the vals mapped to the keys.

在Clojure版本1.0中添加

投影函数

代码语言:javascript
复制
Usage: (project xrel ks)
代码语言:javascript
复制
Returns a rel of the elements of xrel with only the keys in ks

在Clojure版本1.0中添加

重命名函数

代码语言:javascript
复制
Usage: (rename xrel kmap)
代码语言:javascript
复制
Returns a rel of the maps in xrel with the keys in kmap renamed to the vals in kmap

在Clojure版本1.0中添加

rename-key函数

代码语言:javascript
复制
Usage: (rename-keys map kmap)
代码语言:javascript
复制
Returns the map with the keys in kmap renamed to the vals in kmap

在Clojure版本1.0中添加

选择函数

代码语言:javascript
复制
Usage: (select pred xset)
代码语言:javascript
复制
Returns a set of the elements for which pred is true

在Clojure版本1.0中添加

subset函数

代码语言:javascript
复制
Usage: (subset? set1 set2)
代码语言:javascript
复制
Is set1 a subset of set2?

在Clojure版本1.2中添加

superset函数

代码语言:javascript
复制
Usage: (superset? set1 set2)
代码语言:javascript
复制
Is set1 a superset of set2?

在Clojure版本1.2中添加

联合函数

代码语言:javascript
复制
Usage: (union)
       (union s1)
       (union s1 s2)
       (union s1 s2 & sets)
代码语言:javascript
复制
Return a set that is the union of the input sets

在Clojure版本1.0中添加

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com