Cursus Raku / Provectus / Subprogrammata / Stella Whatever

Quiz — Stella Whatever

Quid haec programma imprimit?

my @a = 5, 6, 7, 8, 9;
say @a[*-2];
18
07
09
03

In indice stella nuda * numerum elementorum repraesentat — hic 5. Itaque *-2 est index 3, et elementum ad indicem 3 (a nulla numerando) est 8.

Solutio: Intervallum apertum   |   Vocatio cum duplo puncto