From b29a31d9a01e0e46e68afff099655cedd88db78e Mon Sep 17 00:00:00 2001 From: Mark <53903062+andemark@users.noreply.github.com> Date: Tue, 5 Apr 2022 07:28:41 +0000 Subject: Challenge 159 Solutions (Raku) --- challenge-159/mark-anderson/raku/ch-2.raku | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/challenge-159/mark-anderson/raku/ch-2.raku b/challenge-159/mark-anderson/raku/ch-2.raku index 5d69eda71d..574ef4e4db 100644 --- a/challenge-159/mark-anderson/raku/ch-2.raku +++ b/challenge-159/mark-anderson/raku/ch-2.raku @@ -3,10 +3,10 @@ use Prime::Factor; use Test; -is-deeply ( 1..10)>>.&mobius, ( 1, -1, -1, 0, -1, 1, -1, 0, 0, 1); -is-deeply (11..20)>>.&mobius, (-1, 0, -1, 1, 1, 0, -1, 0, -1, 0); +is-deeply ( 1..10)>>.&möbius, ( 1, -1, -1, 0, -1, 1, -1, 0, 0, 1); +is-deeply (11..20)>>.&möbius, (-1, 0, -1, 1, 1, 0, -1, 0, -1, 0); -sub mobius(\n) +sub möbius(\n) { my @a = prime-factors(n); return 0 if @a.squish < @a; -- cgit