Non-transitive dice: Difference between revisions
m
→{{header|Raku}}: update timing and make insignificant changes
Thundergnat (talk | contribs) (→{{header|Raku}}: minor efficiency tweaks) |
m (→{{header|Raku}}: update timing and make insignificant changes) |
||
Line 1,235:
=={{header|Raku}}==
{{trans|Go}}
<lang perl6># 20201225 Raku programming solution
Line 1,252:
}
sub infix:<⚖️>(@x, @y) { +($_{Less} <=> $_{More}) given (@x X<=> @y).Bag }
sub findIntransitive(\N, \cs) {
my @res = [];
race for [X] ^+cs xx N -> @
my $skip = False;
for @
{ $skip = True and last } unless cs[ @
}
next if $skip;
if cs[ @
}
@res
|