aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shitov <mail@andreyshitov.com>2025-06-23 08:51:00 +0200
committerAndrew Shitov <mail@andreyshitov.com>2025-06-23 08:51:00 +0200
commit2e3cf0455510431c2b4027601ce2f2c87c02070c (patch)
tree2f046379ae070d6c8459336dff5c3f93623f45a9
parent8bcc44355fcd02d7f3558d12ba3d792792adad2d (diff)
downloadperlweeklychallenge-club-2e3cf0455510431c2b4027601ce2f2c87c02070c.tar.gz
perlweeklychallenge-club-2e3cf0455510431c2b4027601ce2f2c87c02070c.tar.bz2
perlweeklychallenge-club-2e3cf0455510431c2b4027601ce2f2c87c02070c.zip
extra variable
-rw-r--r--challenge-327/ash/raku/ch-2a.raku3
1 files changed, 1 insertions, 2 deletions
diff --git a/challenge-327/ash/raku/ch-2a.raku b/challenge-327/ash/raku/ch-2a.raku
index 5da56beb51..1ef1f651a8 100644
--- a/challenge-327/ash/raku/ch-2a.raku
+++ b/challenge-327/ash/raku/ch-2a.raku
@@ -7,7 +7,6 @@ say mad(1, 5, 3, 8); # [(1 3) (5 3)]
sub mad(*@data) {
my $classification = @data.combinations(2).classify: {abs(.[0] - .[1])};
- my $min_diff = $classification.keys.min;
- return ($classification.first: *.key == $min_diff).value;
+ return ($classification.first: *.key == $classification.keys.min).value;
}