RosettaCodeData/Task/Flatten-a-list/NGS/flatten-a-list.ngs
2016-12-05 23:44:36 +01: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, []]))