aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2020-12-09 04:30:51 +0000
committerGitHub <noreply@github.com>2020-12-09 04:30:51 +0000
commite52f846ea97be2e58f3a805a9cfefb54462de8fc (patch)
tree60c24b8a1c8b2fe868c2de9f380a78fd1cc9abc2
parent4cfbd75a1a4ed8e3e992a53ece5b43037eadf07c (diff)
parent0933f85f52933bd3b34cd146bd8ab6a1214e8dd2 (diff)
downloadperlweeklychallenge-club-e52f846ea97be2e58f3a805a9cfefb54462de8fc.tar.gz
perlweeklychallenge-club-e52f846ea97be2e58f3a805a9cfefb54462de8fc.tar.bz2
perlweeklychallenge-club-e52f846ea97be2e58f3a805a9cfefb54462de8fc.zip
Merge pull request #2950 from stuart-little/stuart-little_046
1st commit on 046
-rw-r--r--challenge-046/stuart-little/README1
-rwxr-xr-xchallenge-046/stuart-little/raku/ch-1.p627
-rwxr-xr-xchallenge-046/stuart-little/raku/ch-2.p66
3 files changed, 34 insertions, 0 deletions
diff --git a/challenge-046/stuart-little/README b/challenge-046/stuart-little/README
new file mode 100644
index 0000000000..78439907de
--- /dev/null
+++ b/challenge-046/stuart-little/README
@@ -0,0 +1 @@
+Solutions by Stuart Little
diff --git a/challenge-046/stuart-little/raku/ch-1.p6 b/challenge-046/stuart-little/raku/ch-1.p6
new file mode 100755
index 0000000000..4a94cafd3c
--- /dev/null
+++ b/challenge-046/stuart-little/raku/ch-1.p6
@@ -0,0 +1,27 @@
+#!/usr/bin/env perl6
+use v6;
+
+# run as <script>
+
+sub rep_across_msgs(@a) {
+ (roundrobin @a.List).map({ ($_.Bag (-) $_.Set).keys })
+}
+
+my @a1=(
+ <H x l 4 !>,
+ <c e - l o>,
+ <z e 6 l g>,
+ <H W l v R>,
+ <q 9 m # o>,
+);
+
+my @a2=(
+ Q:w{P + 2 l ! a t o},
+ Q:w{1 e 8 0 R $ 4 u},
+ Q:w{5 - r ] + a > /},
+ Q:w{P x w l b 3 k \},
+ Q:w{2 e 3 5 R 8 y u},
+ Q:w{< ! r ^ ( ) k 0},
+);
+
+for (@a1, @a2) {.&rep_across_msgs.say}
diff --git a/challenge-046/stuart-little/raku/ch-2.p6 b/challenge-046/stuart-little/raku/ch-2.p6
new file mode 100755
index 0000000000..415f17ec1a
--- /dev/null
+++ b/challenge-046/stuart-little/raku/ch-2.p6
@@ -0,0 +1,6 @@
+#!/usr/bin/env perl6
+use v6;
+
+# run as <script>
+
+say (1..500).grep({ $_.sqrt.floor ** 2 == $_ })