

MapAt
Details

- MapAt[f,expr,{i,j,…}] or MapAt[f,expr,{{i,j,…}}] applies f to the part expr[[i,j,…]].
- The list of positions used by MapAt is in the same form as is returned by the function Position. »
- MapAt works on Association objects, using the same specification for keys as in Part.
- MapAt applies f repeatedly to a particular part if that part is mentioned more than once in the list of positions. »
- MapAt[f,pos][expr] is equivalent to MapAt[f,expr,pos].
Examples
open all close allBasic Examples (8)
Scope (9)
Part Specifications (9)
A single element of the expression:
Negative numbers count from the end:
Map using Span syntax:
Generalizations & Extensions (4)
Applications (4)
Properties & Relations (2)
See Also
Map ReplaceAt MapIndexed ReplacePart Delete FlattenAt
Function Repository: AssociationMapAt MapAtKey MapAtEvaluate
Tech Notes
Related Links
History
Introduced in 1988 (1.0) | Updated in 2014 (10.0)
Text
Wolfram Research (1988), MapAt, Wolfram Language function, https://reference.wolfram.com/language/ref/MapAt.html (updated 2014).
CMS
Wolfram Language. 1988. "MapAt." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/MapAt.html.
APA
Wolfram Language. (1988). MapAt. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MapAt.html
BibTeX
@misc{reference.wolfram_2025_mapat, author="Wolfram Research", title="{MapAt}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/MapAt.html}", note=[Accessed: 11-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_mapat, organization={Wolfram Research}, title={MapAt}, year={2014}, url={https://reference.wolfram.com/language/ref/MapAt.html}, note=[Accessed: 11-August-2025]}