Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
seaker committed Dec 7, 2020
1 parent e31dec0 commit fda0f19
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions challenge-090/feng-chang/raku/ch-2.raku
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

sub MAIN(UInt:D $A, UInt:D $B) {
my ($a, $b) = ($A, $B);
my $aw = $a.chars;
my $bw = ($b * $a).chars;
my ($aw, $bw) = ($a.chars, ($b * $a).chars);
my @R;

repeat {
Expand All @@ -16,6 +15,6 @@ sub MAIN(UInt:D $A, UInt:D $B) {

put '-' x ($aw + $bw + 3);

my @S = @R.grep({ .[0] !%% 2 }).map({ .[1] });
my @S = @R.grep(*.[0] !%% 2).map(*.[1]);
put @S.join(' + '), ' = ', @S.sum;
}

0 comments on commit fda0f19

Please sign in to comment.