What I want to know is whether there's a way to define a step function that's
based in part or in whole on the current term's index. For example, how would
I use infix:<...> to generate the perfect squares between 0 and 100? Namely,
'0,1,4,9,16,25,36,49,64,81,100'. For example, is Perl 6 set up to try to pass
the current element's index into the step function by means of a named
parameter?
I would hope for something like:
-> :index { $index * $index } ... 100
or
1, *+:index ... * # 1,3,6,10,15,21,28,36,45,...
(Note: I _don't_ expect the above to work as is; they're merely intended to
convey a rough idea of what I _do_ want.)
If not, how _would_ I generate these lists?