diff options
| -rw-r--r-- | challenge-181/mark-anderson/raku/ch-1.raku | 8 | ||||
| -rw-r--r-- | challenge-181/mark-anderson/raku/ch-2.raku | 8 | ||||
| -rw-r--r-- | challenge-181/mark-anderson/raku/paragraph.txt | 5 | ||||
| -rw-r--r-- | challenge-181/mark-anderson/raku/temps.txt | 10 |
4 files changed, 31 insertions, 0 deletions
diff --git a/challenge-181/mark-anderson/raku/ch-1.raku b/challenge-181/mark-anderson/raku/ch-1.raku new file mode 100644 index 0000000000..00d463e75b --- /dev/null +++ b/challenge-181/mark-anderson/raku/ch-1.raku @@ -0,0 +1,8 @@ +#!/usr/bin/env raku +use Text::Wrap; + +say wrap-text('paragraph.txt'.IO.slurp + .trans(/\n/ => ' ') + .split('.') + .map({ .words.sort(*.lc) }) + .join('. '), :width(60)); diff --git a/challenge-181/mark-anderson/raku/ch-2.raku b/challenge-181/mark-anderson/raku/ch-2.raku new file mode 100644 index 0000000000..2171e768a3 --- /dev/null +++ b/challenge-181/mark-anderson/raku/ch-2.raku @@ -0,0 +1,8 @@ +#!/usr/bin/env raku + +say 'temps.txt'.IO.lines + .sort + .rotor(2 => -1) + .grep({ .[0].match(/\d+$/) < .[1].match(/\d+$/) }) + .map( { .[1].match(/<[\d-]>+/) }) + .join("\n"); diff --git a/challenge-181/mark-anderson/raku/paragraph.txt b/challenge-181/mark-anderson/raku/paragraph.txt new file mode 100644 index 0000000000..af2d76e73b --- /dev/null +++ b/challenge-181/mark-anderson/raku/paragraph.txt @@ -0,0 +1,5 @@ +All he could think about was how it would all end. There was +still a bit of uncertainty in the equation, but the basics +were there for anyone to see. No matter how much he tried to +see the positive, it wasn't anywhere to be seen. The end was +coming and it wasn't going to be pretty. diff --git a/challenge-181/mark-anderson/raku/temps.txt b/challenge-181/mark-anderson/raku/temps.txt new file mode 100644 index 0000000000..7b251c9aec --- /dev/null +++ b/challenge-181/mark-anderson/raku/temps.txt @@ -0,0 +1,10 @@ +2022-08-01, 20 +2022-08-09, 10 +2022-08-03, 19 +2022-08-06, 24 +2022-08-05, 22 +2022-08-10, 28 +2022-08-07, 20 +2022-08-04, 18 +2022-08-08, 21 +2022-08-02, 25 |
