AssociationComap
AssociationComap[{key1,key2,…},x]
creates the association key1key1[x],key2key2[x],… >.
AssociationComap[keys]
represents an operator form of AssociationComap that can be applied to an expression.
Details
- AssociationComap is typically used to apply each of a list of functions to a single common argument, creating an association of the corresponding values.
- If AssociationComap produces repeated keys, later instances replace earlier ones. »
- AssociationComap uses the keys as heads to produce the values. AssociationMap uses the keys as arguments. »
- AssociationComap[keys][x] is equivalent to AssociationComap[keys,x].
- Parallelize[AssociationComap[{key1,key2,…},x]] computes AssociationComap[{key1,keys2,…},x] in parallel on all subkernels. »
Examples
open allclose allBasic Examples (2)
Create an association by wrapping an expression with each element in a list of keys:
Use the operator form of AssociationComap:
Scope (1)
Properties & Relations (5)
AssociationComap[{f1,f2,…},x] creates an association with keys fi:
The values in the association are given by Comap[{f1,f2,…},x]:
AssociationComap[{f1,f2,…},x] is equivalent to AssociationThread[{f1,f2,…}Comap[{f1,f2,…},x]]:
AssociationComap[list,x] gives an association with the same length as DeleteDuplicates[list]:
AssociationComap wraps the keys in a list around an expression:
AssociationMap wraps an expression around the keys in a list:
AssociationComap can be parallelized automatically:
Text
Wolfram Research (2025), AssociationComap, Wolfram Language function, https://reference.wolfram.com/language/ref/AssociationComap.html.
CMS
Wolfram Language. 2025. "AssociationComap." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/AssociationComap.html.
APA
Wolfram Language. (2025). AssociationComap. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AssociationComap.html