hello Bruce;
> # Elegant using the "cat-ears" range modifiers in Perl 6:
> for 0 ..^ @players.end -> \i {
> for i ^.. @players.end -> \j {
> say @players[i,j].join(' vs ');
> }
> }
> # See https://docs.perl6.org/type/Range
i played around it and got:
my @players = ;
my
> On Jul 10, 2019, at 12:17 PM, Marc Chantreux wrote:
—snip--
> my @rounds =
>gather for ^@players -> \p
> { take @players[p,$_] for p^..^@players };
Cool.
Yet another way to do it:
my @rounds = @players.kv.map: -> \k1, \p1 {
|@players.skip(1 + k1).map: -> \p2