diff options
| author | Mark <53903062+andemark@users.noreply.github.com> | 2022-04-05 07:28:41 +0000 |
|---|---|---|
| committer | Mark <53903062+andemark@users.noreply.github.com> | 2022-04-05 07:28:41 +0000 |
| commit | b29a31d9a01e0e46e68afff099655cedd88db78e (patch) | |
| tree | 5bc7b3a12148781c211d7fa328ddb9441a051924 | |
| parent | c748d446c61a5f4c1923e88b09bebb75c26997c2 (diff) | |
| download | perlweeklychallenge-club-b29a31d9a01e0e46e68afff099655cedd88db78e.tar.gz perlweeklychallenge-club-b29a31d9a01e0e46e68afff099655cedd88db78e.tar.bz2 perlweeklychallenge-club-b29a31d9a01e0e46e68afff099655cedd88db78e.zip | |
Challenge 159 Solutions (Raku)
| -rw-r--r-- | challenge-159/mark-anderson/raku/ch-2.raku | 6 |
1 files 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; |
