aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2022-07-16 11:37:09 +0100
committerGitHub <noreply@github.com>2022-07-16 11:37:09 +0100
commit9e2b289629a4273cc825eb6d09e9188171946f45 (patch)
tree8c148804e44c21df2e50ebcdbdf25447343d0261
parent9b0ca2c3a177334a5dd76c5ff5f5c7d82bd7ea0d (diff)
parent2dd4592441a9f370268396ef55bd11171e6c8cd9 (diff)
downloadperlweeklychallenge-club-9e2b289629a4273cc825eb6d09e9188171946f45.tar.gz
perlweeklychallenge-club-9e2b289629a4273cc825eb6d09e9188171946f45.tar.bz2
perlweeklychallenge-club-9e2b289629a4273cc825eb6d09e9188171946f45.zip
Merge pull request #6448 from massa/massa/challenge173
Answers to challenge 173 by Humberto Massa
-rw-r--r--challenge-173/massa/raku/ch-1.raku4
-rw-r--r--challenge-173/massa/raku/ch-2.raku3
2 files changed, 7 insertions, 0 deletions
diff --git a/challenge-173/massa/raku/ch-1.raku b/challenge-173/massa/raku/ch-1.raku
new file mode 100644
index 0000000000..f1a68ab26d
--- /dev/null
+++ b/challenge-173/massa/raku/ch-1.raku
@@ -0,0 +1,4 @@
+use v6;
+unit sub MAIN(Int $n);
+my sub esthetic-number(Int $n --> Bool) { $n.comb.rotor(2 => -1).map({1 == abs [-] $_}).all.Bool }
+say esthetic-number $n
diff --git a/challenge-173/massa/raku/ch-2.raku b/challenge-173/massa/raku/ch-2.raku
new file mode 100644
index 0000000000..b36eea2eb3
--- /dev/null
+++ b/challenge-173/massa/raku/ch-2.raku
@@ -0,0 +1,3 @@
+use v6.d;
+unit sub MAIN(Int $n = 10);
+say (2, 3, * × * + 1 ... *).head: $n