9 lines
177 B
Text
9 lines
177 B
Text
F flatten_r(a:Arr)
|
|
collector {
|
|
local kern
|
|
F kern(x) collect(x)
|
|
F kern(x:Arr) x.each(kern)
|
|
kern(a)
|
|
}
|
|
|
|
echo(flatten_r([[1], 2, [[3, 4], 5], [[[]]], [[[6]]], 7, 8, []]))
|