aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-072/ash/blog.txt1
-rw-r--r--challenge-072/ash/raku/ch-1.raku14
-rw-r--r--challenge-072/ash/raku/ch-2.raku13
3 files changed, 28 insertions, 0 deletions
diff --git a/challenge-072/ash/blog.txt b/challenge-072/ash/blog.txt
new file mode 100644
index 0000000000..9f021f2e94
--- /dev/null
+++ b/challenge-072/ash/blog.txt
@@ -0,0 +1 @@
+https://andrewshitov.com/2020/08/04/raku-challenge-week-72/
diff --git a/challenge-072/ash/raku/ch-1.raku b/challenge-072/ash/raku/ch-1.raku
new file mode 100644
index 0000000000..24387f4f87
--- /dev/null
+++ b/challenge-072/ash/raku/ch-1.raku
@@ -0,0 +1,14 @@
+#!/usr/bin/env raku
+
+# Task 1 from
+# https://perlweeklychallenge.org/blog/perl-weekly-challenge-072/
+
+# Comments: https://andrewshitov.com/2020/08/04/raku-challenge-week-72/
+
+unit sub MAIN(Int $n);
+
+my $f = [*] 1..$n;
+say "$n! = $f";
+# $f ~~ / 0+! $/;
+# say ($f ~~ / 0+ $/).chars;
+say ($f ~~ / 0+ $/ // '').chars;
diff --git a/challenge-072/ash/raku/ch-2.raku b/challenge-072/ash/raku/ch-2.raku
new file mode 100644
index 0000000000..51b409ab5b
--- /dev/null
+++ b/challenge-072/ash/raku/ch-2.raku
@@ -0,0 +1,13 @@
+#!/usr/bin/env raku
+
+# Task 2 from
+# https://perlweeklychallenge.org/blog/perl-weekly-challenge-072/
+
+# Comments: https://andrewshitov.com/2020/08/04/raku-challenge-week-72/
+
+# Generating input.txt:
+# $ raku -e'say "L$_" for 1..100' > input.txt
+
+unit sub MAIN(Int $a, Int $b where 0 < $a <= $b <= 100);
+
+.say for 'input.txt'.IO.lines[$a-1 ..^ $b];