for @array -> $index, $value
        say "Element $_ is called $value"

But I don't understand how the "$index, $value" pair gets its values; is
@array somehow turned into a hash with the index as the key?
With @array -> $index, $value {}, is $_ an alias of $index?

No. There's no such magic. I simply screwed up. I should have written:

   for @array.kv -> $index, $value {...}



Reply via email to