ListTools
FlattenOnce
flatten a (possible nested) list once
Calling Sequence
Parameters
Description
Examples
FlattenOnce(L)
L
-
list
The FlattenOnce(L) function converts any element in list L which are of type list to expression sequences.
Note: The procedure ListTools[FlattenOnce](L) is more efficient than a call to ListTools[Flatten](L, 1).
with⁡ListTools:
L≔1,2,3,4,5,6
FlattenOnce⁡L
1,2,3,4,5,6
Flatten⁡L
See Also
inline
ListTools[Flatten]
seq
type[list]
Download Help Document