KeyValueMap

KeyValueMap[f,<|key1val1,key2val2,|>]

给出列表 {f[key1,val1],f[key2,val2],}.

KeyValueMap[f]

代表可应用于表达式的 KeyValueMap 的一个运算符形式.

更多信息

范例

打开所有单元关闭所有单元

基本范例  (2)

为一个关联关系的键值绘制函数:

Use the operator form of KeyValueMap:

属性和关系  (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.

文本

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 年

BibTeX

@misc{reference.wolfram_2024_keyvaluemap, author="Wolfram Research", title="{KeyValueMap}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/KeyValueMap.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_keyvaluemap, organization={Wolfram Research}, title={KeyValueMap}, year={2015}, url={https://reference.wolfram.com/language/ref/KeyValueMap.html}, note=[Accessed: 22-November-2024 ]}