aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchirvasitua <stuart-little@users.noreply.github.com>2020-12-11 13:13:52 -0500
committerchirvasitua <stuart-little@users.noreply.github.com>2020-12-11 13:13:52 -0500
commit3592b19f5724d6b4e6688c5800a4a70948616277 (patch)
tree9ebcc66548f0f3811d12367f44670da8eaa336e4
parent931e28a9fe63ad0942cf9f3099191a0e21a978c2 (diff)
downloadperlweeklychallenge-club-3592b19f5724d6b4e6688c5800a4a70948616277.tar.gz
perlweeklychallenge-club-3592b19f5724d6b4e6688c5800a4a70948616277.tar.bz2
perlweeklychallenge-club-3592b19f5724d6b4e6688c5800a4a70948616277.zip
1st commit on 026
-rw-r--r--challenge-026/stuart-little/README1
-rwxr-xr-xchallenge-026/stuart-little/raku/ch-1.p66
-rwxr-xr-xchallenge-026/stuart-little/raku/ch-2.p66
3 files changed, 13 insertions, 0 deletions
diff --git a/challenge-026/stuart-little/README b/challenge-026/stuart-little/README
new file mode 100644
index 0000000000..78439907de
--- /dev/null
+++ b/challenge-026/stuart-little/README
@@ -0,0 +1 @@
+Solutions by Stuart Little
diff --git a/challenge-026/stuart-little/raku/ch-1.p6 b/challenge-026/stuart-little/raku/ch-1.p6
new file mode 100755
index 0000000000..dd69f0ff39
--- /dev/null
+++ b/challenge-026/stuart-little/raku/ch-1.p6
@@ -0,0 +1,6 @@
+#!/usr/bin/env perl6
+use v6;
+
+# run as <script> <stones jewels>
+
+say @*ARGS[1].comb.grep({ @*ARGS[0].contains($_) }).elems
diff --git a/challenge-026/stuart-little/raku/ch-2.p6 b/challenge-026/stuart-little/raku/ch-2.p6
new file mode 100755
index 0000000000..b46fcb5881
--- /dev/null
+++ b/challenge-026/stuart-little/raku/ch-2.p6
@@ -0,0 +1,6 @@
+#!/usr/bin/env perl6
+use v6;
+
+# run as <script> <space-separated list of angles in degrees>
+
+say atan2(|(&sin,&cos).map( -> &f { @*ARGS.map((*.EVAL * pi / 180).&f).sum })) * 180 / pi