P07 - 将嵌套数组结构扁平化。
作者:最初由 Ryan Connelly 编写
示例
> my @a = 1, 2, [3, 4], 5; > say @a.flat.list.perl (1, 2, 3, 4, 5)
源代码: P07-topo.pl
use v6; my @a := 1, 2, [3, 4], 5; say @a.perl; say 'Flattened:'; say @a.flat.list.perl;
作者:最初由 Ryan Connelly 编写
> my @a = 1, 2, [3, 4], 5; > say @a.flat.list.perl (1, 2, 3, 4, 5)
源代码: P07-topo.pl
use v6; my @a := 1, 2, [3, 4], 5; say @a.perl; say 'Flattened:'; say @a.flat.list.perl;