Flatten

Command: Flatten


Synopsis

array Flatten -> array
array integer Flatten -> array
References

[1] The Mathematica Book V4.0 "Flatten"
Description

Flatten called with one argument flattens out all levels of
the argument. Flatten called with two arguments flattens out
the first n levels.
File
lib/sli/mathematica.sli
Author
Gewaltig Diesmann
FirstVersion
Gewaltig
Examples

[3 [4 [5 [6]]] 7] Flatten --> [3 4 5 6 7]
[3 [4 [5 [6]]] 7] 1 Flatten --> [3 4 [5 [6]] 7]
[3 [4 [5 [6]]] 7] 2 Flatten --> [3 4 5 [6] 7]