This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| new=2026.08 my class A does Callable { has Str $.signature = "foo"; method CALL-ME($b) { "$b $!signature" } }; my constant &prefix:<c> = A.new; say c "hello"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| old=2025.01 my class A does Callable { has Str $.signature = "foo"; method CALL-ME($b) { "$b $!signature" } }; my constant &prefix:<c> = A.new; say c "hello"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub word(Str $g, Str $m, Str $f, Str $u --> Str) { $g eq "M" ?? $m !! $g eq "F" ?? $f !! $u }; my @g = <M F U>; my %want = M => "m", F => "f", U => "u"; my $wrong = 0; for ^20000 -> $i { my $g = @g[$i % 3]; $wrong++ if word($g, "m", "f", "u") ne %want{$g}; }; say $wrong == 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub word(Str $g, Str $m, Str $f, Str $u --> Str) { $g eq "M" ?? $m !! $g eq "F" ?? $f !! $u }; my @g = <M F U>; my %want = M => "m", F => "f", U => "u"; my $wrong = 0; for ^20000 -> $i { my $g = @g[$i % 3]; $wrong++ if word($g, "m", "f", "u") ne %want{$g}; }; say $wrong == 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub word(Str $g, Str $m, Str $f, Str $u --> Str) { $g eq "M" ?? $m !! $g eq "F" ?? $f !! $u }; my @g = <M F U>; my %want = M => "m", F => "f", U => "u"; my $wrong = 0; for ^20000 -> $i { my $g = @g[$i % 3]; $wrong++ if word($g, "m", "f", "u") ne %want{$g}; }; say $wrong == 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Test; sub word(Str $g, Str $m, Str $f, Str $u --> Str) { $g eq 'M' ?? $m !! $g eq 'F' ?? $f !! $u }; my @g = <M F U>; my %want = M => 'm', F => 'f', U => 'u'; my $wrong = 0; for ^20000 -> $i { my $g = @g[$i % 3]; $wrong++ if word($g, 'm', 'f', 'u') ne %want{$g}; }; is $wrong, 0, 'an inlined ternary chain returns the right |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sink do (100 + 1) =:= (102 - 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sink do (100 + 1) =:= (102 - 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sink do (100 + 1) =:= (102 - 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| so $ = do (100 + 1) =:= (102 - 1) |
NewerOlder