From 2cd88e77862b139e1f093ebd33825e80e1ff411e Mon Sep 17 00:00:00 2001 From: Asher Harvey-Smith Date: Tue, 16 Apr 2024 12:35:43 +0100 Subject: cannot stop tweaking for the life of me --- challenge-265/asherbhs/raku/ch-1.raku | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/challenge-265/asherbhs/raku/ch-1.raku b/challenge-265/asherbhs/raku/ch-1.raku index 1eaf883865..a81cddabca 100644 --- a/challenge-265/asherbhs/raku/ch-1.raku +++ b/challenge-265/asherbhs/raku/ch-1.raku @@ -1,5 +1,6 @@ sub appearance(Int:D @ints --> Int) { - my @keys = @ints.Bag.grep(*.value ≥ 0.33 × @ints)».key; + my $len = 0.33 × @ints; + my @keys = @ints.Bag.grep(*.value ≥ $len)».key; @keys ?? min @keys !! Int } -- cgit