Legacy Documentation

Mathematica® Teacher's Edition (2002)

This is documentation for an obsolete product.
Current products and services
 Documentation /  Mathematica Teacher's Edition /  Built-in Functions /  Lists and Matrices /  List Operations /

Insert

FilledSmallSquare Insert[list, elem, n] inserts elem at position n in list. If n is negative, the position is counted from the end.
FilledSmallSquare Insert[expr, elem, i, j, ... ] inserts elem at position i, j, ... in expr.
FilledSmallSquare Insert[expr, elem, , , ... , , , ... , ... ] inserts elem at several positions.

FilledSmallSquare Examples: Insert[a, b, c, x, 2]LongRightArrow.
FilledSmallSquare Insert[a, b, c, x, 1, -1]LongRightArrow.
FilledSmallSquare Insert[a, b, c, d, x, 2, 1]LongRightArrow.
FilledSmallSquare list can have any head, not necessarily List.
FilledSmallSquare See The Mathematica Book on the web: Section 1.8.6.
FilledSmallSquare See also: Prepend, Append, Take, Drop, Delete, ReplacePart, Position.