We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 26a84b0 commit 4004d67Copy full SHA for 4004d67
challenge-012/stuart-little/README
@@ -0,0 +1 @@
1
+Solutions by Stuart Little
challenge-012/stuart-little/raku/ch-1.p6
@@ -0,0 +1,6 @@
+#!/usr/bin/env perl6
2
+use v6;
3
+
4
+([\*] (2..*).grep(*.is-prime)).map(*+1).first(! *.is-prime).say
5
6
+# run as <script>
challenge-012/stuart-little/raku/ch-2.p6
@@ -0,0 +1,11 @@
+my %*SUB-MAIN-OPTS=:named-anywhere,;
+sub MAIN(
+ Str :s(:sep(:$separator)) where *.chars==1 ='/',
7
+ *@DIRECTORIES,
8
+ ) {
9
+ @DIRECTORIES[0] ~~ m:exhaustive/(^.*) <?before $separator || $>/;
10
+ say $/.map(*.Str).grep(! *.ends-with($separator)).first( -> $dir { @DIRECTORIES.all ~~ /^$dir(\/ || $)/ })
11
+}
0 commit comments