aboutsummaryrefslogtreecommitdiff
path: root/challenge-081
diff options
context:
space:
mode:
authorMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-10-08 15:38:00 +0200
committerMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-10-08 15:38:00 +0200
commit9817474c0b7f76d936b16a38a836c13bf6d69ab3 (patch)
treee8ea78f280d3a9b6131bb50daa2c46fc539ab28c /challenge-081
parent1cdbe1caf321faa72362f4a6c2c8ba5ec0c36ba0 (diff)
downloadperlweeklychallenge-club-9817474c0b7f76d936b16a38a836c13bf6d69ab3.tar.gz
perlweeklychallenge-club-9817474c0b7f76d936b16a38a836c13bf6d69ab3.tar.bz2
perlweeklychallenge-club-9817474c0b7f76d936b16a38a836c13bf6d69ab3.zip
bugfix and optimization
Diffstat (limited to 'challenge-081')
-rw-r--r--challenge-081/markus-holzer/raku/ch-1.raku6
1 files changed, 2 insertions, 4 deletions
diff --git a/challenge-081/markus-holzer/raku/ch-1.raku b/challenge-081/markus-holzer/raku/ch-1.raku
index db9c216af9..d29156c0bb 100644
--- a/challenge-081/markus-holzer/raku/ch-1.raku
+++ b/challenge-081/markus-holzer/raku/ch-1.raku
@@ -6,8 +6,6 @@ my Str $B = @*ARGS.max(*.chars);
# Custom operator, just for fun
multi sub infix:<%%>( Str $n, Str $d ) returns Bool {
given $n.chars / $d.chars {
- .denominator == 1
- ?? $n eq $d x $_
- !! False }}
+ .denominator == 1 && $n eq $d x $_ }}
-.say for grep all($A, $B) %% *, [\~] $A.comb \ No newline at end of file
+.say for grep all($A, $B) %% *, [\~] $A.comb;