From 16a99f5bf5681b0adc157f4588672cc7a9ec4da6 Mon Sep 17 00:00:00 2001 From: Andrew Shitov Date: Mon, 26 May 2025 10:56:07 +0200 Subject: truncate the rest of calculations --- challenge-323/ash/raku/ch-2.raku | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/challenge-323/ash/raku/ch-2.raku b/challenge-323/ash/raku/ch-2.raku index aac6590902..91727ca2c9 100644 --- a/challenge-323/ash/raku/ch-2.raku +++ b/challenge-323/ash/raku/ch-2.raku @@ -24,7 +24,9 @@ sub income-tax($income, @levels) { else { $taxable = $remainder; $remainder = 0; - } + } + + last unless $taxable; $tax += $taxable * $rate / 100; -- cgit