Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
9
Task/Flatten-a-list/NGS/flatten-a-list.ngs
Normal file
9
Task/Flatten-a-list/NGS/flatten-a-list.ngs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
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, []]))
|
||||
Loading…
Add table
Add a link
Reference in a new issue