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.
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 all close allBasic Examples (2)
Create an association by wrapping an expression with each element in a list of keys:
AssociationComap[{f, g, h}, x]Use the operator form of AssociationComap:
AssociationComap[{Sin, Cos, Tan}][Pi / 3]Scope (1)
Properties & Relations (5)
AssociationComap[{f1,f2,…},x] creates an association with keys fi:
AssociationComap[{f, g, h}, x]Keys[%]The values in the association are given by Comap[{f1,f2,…},x]:
Values[%%]% === Comap[{f, g, h}, x]AssociationComap[{f1,f2,…},x] is equivalent to AssociationThread[{f1,f2,…}Comap[{f1,f2,…},x]]:
AssociationComap[{f, g, h}, x]Comap[{f, g, h}, x]%% === AssociationThread[{f, g, h} -> %]AssociationComap[list,x] gives an association with the same length as DeleteDuplicates[list]:
list = {f, g, g};AssociationComap[list, x]Length[%] == Length[DeleteDuplicates[list]]AssociationComap wraps the keys in a list around an expression:
AssociationComap[{f, g, h}, x]AssociationMap wraps an expression around the keys in a list:
AssociationMap[f, {x, y, z}]AssociationComap can be parallelized automatically:
Parallelize[AssociationComap[{f, g, h}, x]]History
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
BibTeX
@misc{reference.wolfram_2026_associationcomap, author="Wolfram Research", title="{AssociationComap}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/AssociationComap.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_associationcomap, organization={Wolfram Research}, title={AssociationComap}, year={2025}, url={https://reference.wolfram.com/language/ref/AssociationComap.html}, note=[Accessed: 12-June-2026]}