aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-218/barroff/raku/ch-1.raku4
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-218/barroff/raku/ch-1.raku b/challenge-218/barroff/raku/ch-1.raku
index b836ad597d..5f14669046 100644
--- a/challenge-218/barroff/raku/ch-1.raku
+++ b/challenge-218/barroff/raku/ch-1.raku
@@ -2,8 +2,8 @@
use v6.d;
-sub maximum-product(Int:D @numbers where @numbers.elems ≥ 3 --> Int) {
- return max(map({ [*] $_ }, @numbers.combinations(3)));
+sub maximum-product(Int:D @numbers where @numbers.elems ≥ 3, Int:D $k = 3 --> Int) {
+ return max(map({ [*] $_ }, @numbers.combinations($k)));
}
#| Run test cases