ListTools
Flatten
flatten a list containing lists of elements
Calling Sequence
Parameters
Description
Examples
Flatten(L, N)
L
-
list
N
non-negative integer
The Flatten(L) function recursively converts any elements in a list which are of type list to expression sequences.
The Flatten(L, N) function flattens a nested list of lists N times.
Note: The inlined procedure FlattenOnce⁡L is more efficient than a call to Flatten(L, 1).
with⁡ListTools:
L≔1,2,3,4,5,6
Flatten⁡L
1,2,3,4,5,6
Flatten⁡L,1
See Also
ListTools[FlattenOnce]
seq
type/list
Download Help Document