This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / Structure Manipulation  /
FlattenAt

  • FlattenAt[ list , n ] flattens out a sublist that appears as the n element of list. If n is negative, the position is counted from the end.
  • FlattenAt[ expr , i , j , ... ] flattens out the part of expr at position i , j , ... .
  • FlattenAt[ expr , , , ... , , , ... , ... ] flattens out parts of expr at several positions.
  • Example: FlattenAt[ a, b, c , d, e , 2].
  • See the Mathematica book: Section 1.8.12Section 2.2.10.
  • See also: DeleteCases, Flatten, Sequence, SlotSequence.

    Further Examples

    This flattens out only the sublist that appears at position 2.

    In[1]:=

    Out[1]=