diff options
| -rw-r--r-- | challenge-081/markus-holzer/raku/ch-1.raku | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/challenge-081/markus-holzer/raku/ch-1.raku b/challenge-081/markus-holzer/raku/ch-1.raku index 8d61f71011..5f67b1f491 100644 --- a/challenge-081/markus-holzer/raku/ch-1.raku +++ b/challenge-081/markus-holzer/raku/ch-1.raku @@ -1,7 +1,7 @@ -unit sub MAIN(Str $A, $B); +unit sub MAIN( Str $A, $B where $B.chars > $A.chars ); -my $chars = ( $A, $B ).max.chars; -my @chars = ( $A, $B ).min.comb; +# Custom operator, just for fun +multi sub infix:<%%>( Str $n, Str $d ) { + $n eq $d x $n.chars div $d.chars } -.say for ( [\~] @chars ).grep( -> $part { - $part x $chars div $part.chars eq $B })
\ No newline at end of file +.say for grep $B %% *, [\~] $A.comb
\ No newline at end of file |
