Go Fish/Raku: Difference between revisions

m
(→‎{{header|Perl 6}}: Update to work with modern Rakudo)
 
(3 intermediate revisions by 2 users not shown)
Line 1:
{{collection|Go Fish}}
=={{example|task=Go Fish|language=Raku}}==
 
{{works with|Rakudo|20172019.0203.1}}
 
<syntaxhighlight lang="raku" perl6line>constant BOOKSIZE = 4;
constant HANDSIZE = 9;
constant @pips = <two three four five six seven eight nine ten jack queen king ace>;
Line 27 ⟶ 28:
 
sub maxes (&f, *@a) {
my $x = [max] map &f, @a;
return @a.grep: { f($^e) eqv $x };
}
Line 225 ⟶ 226:
}
 
sub MAIN () { play }</langsyntaxhighlight>
10,327

edits