Flatten
flattens out nested lists in
expr
.
stops flattening at level
n
.
flattens expressions with head
h
instead of ‘List’.
Examples
Flatten also works in irregularly shaped arrays
Levels to be flattened together in {{-1, 2}} should be lists of positive integers.
Level 2 specified in {{1}, {2}} exceeds the levels, 1, which can be flattened together in {a, b}.
Check n
completion
Level 4 specified in {{2}, {1}, {3}, {4}} exceeds the levels, 3, which can be flattened together in {{{1, 2}, {3}}, {{4}, {5, 6}}}.
Implementation status
- ✅ - full supported