Course of Raku / Advanced / Containers / Ordered containers / Flattening and itemisation
Quiz — Nesting arrays
What does the following program print?
my @a = 1, 2, 3;
my @b = 4, 5;
my @c = @a, @b;
say @c.elems;| 0 | 5 |
| 1 | 2 |
| 0 | 3 |
| 0 | 0 |
Course of Raku / Advanced / Containers / Ordered containers / Flattening and itemisation
What does the following program print?
my @a = 1, 2, 3;
my @b = 4, 5;
my @c = @a, @b;
say @c.elems;| 0 | 5 |
| 1 | 2 |
| 0 | 3 |
| 0 | 0 |