I've written a code to calculate the Fibonacci series using array variables inside the explicit generator like this:
my @fib = [0],[1],-> @a, @b {[|@a Z+ |@b]} ... Inf;
say @fib[^6];
This works as expected. But when I use scalar variables inside the same code, it works too:
my @fib_v2 = [0],[1],-> $a, $b {[|$a Z+ |$b]} ... Inf;
say @fib_v2[^6];
Could they be called scalar variables pointing to the arrays? What are they called when they are used in this manner?
Note that I've browsed the online Raku documentation but it's hard to spot that particular information i.e. if arrays can be referred using scalar variables.