Name: Flatten - flatten out a nested list

Synopsis:

array         Flatten -&gt; array 
array integer Flatten -&gt; array


Examples:

[3 [4 [5 [6]]] 7] Flatten   --&gt;  [3 4 5 6 7] 
[3 [4 [5 [6]]] 7] 1 Flatten --&gt;  [3 4 [5 [6]] 7] 
[3 [4 [5 [6]]] 7] 2 Flatten --&gt;  [3 4 5 [6] 7]


Description:

Flatten called with one argument flattens out all levels of 
the argument. Flatten called with two arguments flattens out 
the first n levels.


References:

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


Author:

Gewaltig, Diesmann


FirstVersion:

Gewaltig


SeeAlso:

Partition
FixedPoint

Source:

/var/www/debian/nest/nest-simulator-2.20.0/lib/sli/mathematica.sli
