Course of Raku / Advanced / Debugging / Turning values into text / The .Str method

Quiz — gist and Str

What does the following program print?

my @a = 1, 2, 3;
say @a.Str;
0[1 2 3]
11 2 3
0(1 2 3)
01, 2, 3

.Str gives the plain string form, where the elements are simply joined by spaces with no brackets: 1 2 3. The bracketed form [1 2 3] is what .gist (and therefore say @a) would produce.

Course navigation

The .Str method   |   The .raku method