aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author冯昶 <fengchang@novel-supertv.com>2023-03-07 10:35:41 +0800
committer冯昶 <fengchang@novel-supertv.com>2023-03-07 10:35:41 +0800
commita9fb614002e21969691cc0883239db1a383904b6 (patch)
treefd34f3e04705095c4f92c36c8a96399ef9db1c71
parent849fbc07ea10ad83d018bccc357c758e8855474e (diff)
downloadperlweeklychallenge-club-a9fb614002e21969691cc0883239db1a383904b6.tar.gz
perlweeklychallenge-club-a9fb614002e21969691cc0883239db1a383904b6.tar.bz2
perlweeklychallenge-club-a9fb614002e21969691cc0883239db1a383904b6.zip
challenge 207, raku solutions
-rwxr-xr-xchallenge-207/feng-chang/raku/ch-1.raku7
-rwxr-xr-xchallenge-207/feng-chang/raku/ch-2.raku5
2 files changed, 12 insertions, 0 deletions
diff --git a/challenge-207/feng-chang/raku/ch-1.raku b/challenge-207/feng-chang/raku/ch-1.raku
new file mode 100755
index 0000000000..cd6e9ecc55
--- /dev/null
+++ b/challenge-207/feng-chang/raku/ch-1.raku
@@ -0,0 +1,7 @@
+#!/bin/env raku
+
+unit sub MAIN(*@words);
+
+my %AtRow = <qwertyuiop asdfghjkl zxcvbnm>.map({ .comb.all => $++ });
+
+put @words.grep({ [==] %AtRow{ .lc.comb } });
diff --git a/challenge-207/feng-chang/raku/ch-2.raku b/challenge-207/feng-chang/raku/ch-2.raku
new file mode 100755
index 0000000000..47315c561d
--- /dev/null
+++ b/challenge-207/feng-chang/raku/ch-2.raku
@@ -0,0 +1,5 @@
+#!/bin/env raku
+
+unit sub MAIN(*@N);
+
+put (+@N...1).first(-> \m { @N.grep(* ≥ m) ≥ m });