This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.

# Flatten

 Flatten[list]flattens out nested lists. Flatten[list, n]flattens to level n. Flatten[list, n, h]flattens subexpressions with head h. Flatten[list, {{s11, s12, ...}, {s21, s22, ...}, ...}] flattens list by combining all levels sij to make each level i in the result.
• Flatten "unravels" lists, effectively just deleting inner braces.
• Flatten[list, n] effectively flattens the top level in list n times.
• Flatten[f[e, ...]] flattens out subexpressions with head f.
• If the mij are matrices, Flatten[{{m11, m12}, {m21, m22}}, {{1, 3}, {2, 4}}] effectively constructs a single matrix from the "blocks" mij.
• Flatten[list, {{i1}, {i2}, ...}] effectively transposes levels in list, putting level ik in list at level k in the result. Note that the function Transpose in effect uses an inverse of this specification.
Flatten out lists at all levels:
 Out[1]=

Flatten only at level 1:
 Out[1]=
 Scope   (5)
 Applications   (4)