Wolfram ResearchPRODUCTSPURCHASEFOR USERSCOMPANYOUR SITES
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Documentation / Mathematica / Built-in Functions / Programming / Functional Programming /

MapAt

FilledSmallSquare MapAt[f, expr, n] applies f to the element at position n in expr. If n is negative, the position is counted from the end.

FilledSmallSquare MapAt[f, expr, i, j, ... ] applies f to the part of expr at position i, j, ... .

FilledSmallSquare MapAt[f, expr, , , ... , , , ... , ... ] applies f to parts of expr at several positions.

FilledSmallSquare Example: MapAt[f, a, b, c, 2] LongRightArrow.

FilledSmallSquare MapAt[f, a, b, c, d, 1, 4] LongRightArrow.

FilledSmallSquare MapAt[f, expr, i, j, ... ] or MapAt[f, expr, i, j, ... ] applies f to the part expr[[i, j, ... ]].

FilledSmallSquare MapAt[f, expr, , , ... , , , ... , ... ] applies f to parts expr[[, , ... ]], expr[[, , ... ]], ... .

FilledSmallSquare The list of positions used by MapAt is in the same form as is returned by the function Position.

FilledSmallSquare MapAt applies f repeatedly to a particular part if that part is mentioned more than once in the list of positions.

FilledSmallSquare Example: MapAt[f, a, b, c, 1, 3, 1] LongRightArrow.

FilledSmallSquare See Section 2.2.4.

FilledSmallSquare See also: ReplacePart, Delete, FlattenAt.

FilledSmallSquare New in Version 1.

Further Examples



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information


 © 2009 Wolfram Research, Inc.  Terms of Use  Privacy Policy | [ja] |
Sign up for our newsletter: