diff options
| author | Simon Proctor <simon.proctor@zoopla.co.uk> | 2020-06-15 10:23:45 +0100 |
|---|---|---|
| committer | Simon Proctor <simon.proctor@zoopla.co.uk> | 2020-06-15 10:23:45 +0100 |
| commit | 3fe990a60420be96a93c4d0dc80ea345fb418152 (patch) | |
| tree | f44c90dc8f3b875b04894cf688b25597e77abac4 /challenge-065 | |
| parent | 5834ac4aec05ea3206c8a00ac56b90d2f117812f (diff) | |
| download | perlweeklychallenge-club-3fe990a60420be96a93c4d0dc80ea345fb418152.tar.gz perlweeklychallenge-club-3fe990a60420be96a93c4d0dc80ea345fb418152.tar.bz2 perlweeklychallenge-club-3fe990a60420be96a93c4d0dc80ea345fb418152.zip | |
Don't need the gathers here
Diffstat (limited to 'challenge-065')
| -rw-r--r-- | challenge-065/simon-proctor/raku/ch-1.p6 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-065/simon-proctor/raku/ch-1.p6 b/challenge-065/simon-proctor/raku/ch-1.p6 index 9843b1459e..dd019f5930 100644 --- a/challenge-065/simon-proctor/raku/ch-1.p6 +++ b/challenge-065/simon-proctor/raku/ch-1.p6 @@ -18,9 +18,9 @@ multi sub MAIN ( .say for calculate-sums( $n, $s, 1 ).grep( { defined $_ } ); } -multi sub calculate-sums( UInt $n, UInt $s where { $n * 9 < $s }, $ ) { gather take Nil } +multi sub calculate-sums( UInt $n, UInt $s where { $n * 9 < $s }, $ ) {} -multi sub calculate-sums( UInt $n, 0, $ ) { gather take 0 x $n } +multi sub calculate-sums( UInt $n, 0, $ ) { 0 x $n } multi sub calculate-sums( UInt $n, UInt $s, $start = 0 ) { my $end = $s > 9 ?? 9 !! $s; |
