KeyValueMap
KeyValueMap[f,<key1val1,key2val2,… >]
给出列表 {f[key1,val1],f[key2,val2],…}.
KeyValueMap[f]
代表可应用于表达式的 KeyValueMap 的一个运算符形式.
更多信息
- KeyValueMap[f][assoc] 等价于 KeyValueMap[f,assoc].
- Parallelize[KeyValueMap[f,key1val1,key2val2,…]] 在所有子内核上并行计算 KeyValueMap[f,key1val1,key2val2,…]. »
范例
打开所有单元关闭所有单元基本范例 (2)
属性和关系 (3)
KeyValueMap[f,assoc] is equivalent to MapApply[f,Normal[assoc]]:
KeyValueMap maps a function over the keys and values in an association (and returns a list):
AssociationMap maps a function over the rules in an association:
KeyMap maps a function over the keys in an association:
Map maps a function over the values in an association:
KeyValueMap can be parallelized automatically:
文本
Wolfram Research (2015),KeyValueMap,Wolfram 语言函数,https://reference.wolfram.com/language/ref/KeyValueMap.html.
CMS
Wolfram 语言. 2015. "KeyValueMap." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/KeyValueMap.html.
APA
Wolfram 语言. (2015). KeyValueMap. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/KeyValueMap.html 年