Mathematica 9 is now available

MapAll (//@)MapIndexed

MapAt

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

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

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

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

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

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

FilledSmallSquareMapAt[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.

FilledSmallSquareMapAt 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 The Mathematica Book: Section 2.2.4.

FilledSmallSquare See also: ReplacePart, Delete, FlattenAt.

Further Examples

MapAll (//@)MapIndexed



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.