aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Sajid Anwar <Mohammad.Anwar@yahoo.com>2024-07-22 10:59:51 +0100
committerGitHub <noreply@github.com>2024-07-22 10:59:51 +0100
commite434ab02182fc313b5ae3dd19b98a0903d530fb0 (patch)
tree4f60f2372ba51bb504ff95656909d600d44db698
parentf0657bdc1b2b49b891599fef616a3e03e46e208c (diff)
parent95959fe8d23ab6d918a5d7a5c8425bffd85dad6d (diff)
downloadperlweeklychallenge-club-e434ab02182fc313b5ae3dd19b98a0903d530fb0.tar.gz
perlweeklychallenge-club-e434ab02182fc313b5ae3dd19b98a0903d530fb0.tar.bz2
perlweeklychallenge-club-e434ab02182fc313b5ae3dd19b98a0903d530fb0.zip
Merge pull request #10474 from codereport/master
Challenge 279 in BQN
-rw-r--r--challenge-279/conor-hoekstra/ch-1.bqn9
-rw-r--r--challenge-279/conor-hoekstra/ch-2.bqn11
2 files changed, 20 insertions, 0 deletions
diff --git a/challenge-279/conor-hoekstra/ch-1.bqn b/challenge-279/conor-hoekstra/ch-1.bqn
new file mode 100644
index 0000000000..babe0fd000
--- /dev/null
+++ b/challenge-279/conor-hoekstra/ch-1.bqn
@@ -0,0 +1,9 @@
+# For up to date code:
+# https://github.com/codereport/bqn-code/blob/main/pwc/279-1.bqn
+
+SortLetters ← ⍋⊸⊏
+
+# Tests
+•Show ⟨3, 2, 1, 4⟩ SortLetters "REPL" # PERL
+•Show ⟨2, 4, 1, 3⟩ SortLetters "AURK" # RAKU
+•Show ⟨5, 4, 2, 6, 1, 3⟩ SortLetters "OHYNPT" # PYTHON
diff --git a/challenge-279/conor-hoekstra/ch-2.bqn b/challenge-279/conor-hoekstra/ch-2.bqn
new file mode 100644
index 0000000000..bec9425ab1
--- /dev/null
+++ b/challenge-279/conor-hoekstra/ch-2.bqn
@@ -0,0 +1,11 @@
+# For up to date code:
+# https://github.com/codereport/bqn-code/blob/main/pwc/279-2.bqn
+
+⟨IsVowel⟩ ⇐ •Import "../lib/string.bqn"
+
+SplitString ← ¬2|·+´IsVowel¨
+
+# Tests
+•Show SplitString "perl" # 0
+•Show SplitString "book" # 1
+•Show SplitString "good morning" # 1