RosettaCodeData/Task/Flatten-a-list/NGS/flatten-a-list.ngs
2023-07-01 13:44:08 -04:00

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, []]))