From 3fe990a60420be96a93c4d0dc80ea345fb418152 Mon Sep 17 00:00:00 2001 From: Simon Proctor Date: Mon, 15 Jun 2020 10:23:45 +0100 Subject: Don't need the gathers here --- challenge-065/simon-proctor/raku/ch-1.p6 | 4 ++-- 1 file 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; -- cgit