diff options
| author | Mohammad Sajid Anwar <Mohammad.Anwar@yahoo.com> | 2024-07-16 11:45:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-16 11:45:43 +0100 |
| commit | 704ee550591dbb4a7381f5aad717cbf29a6ad441 (patch) | |
| tree | 14c145a127c204d746e458d3f347015916c62115 | |
| parent | e5c098d9ea3e6bc5b83063f7f2553156f361ad27 (diff) | |
| parent | 9e3c397d60a91fa9923c5ca5bf5f5074de46fcb2 (diff) | |
| download | perlweeklychallenge-club-704ee550591dbb4a7381f5aad717cbf29a6ad441.tar.gz perlweeklychallenge-club-704ee550591dbb4a7381f5aad717cbf29a6ad441.tar.bz2 perlweeklychallenge-club-704ee550591dbb4a7381f5aad717cbf29a6ad441.zip | |
Merge pull request #10440 from codereport/master
:sparkles: Challenge 278 in BQN
| -rw-r--r-- | challenge-278/conor-hoekstra/ch-1.bqn | 11 | ||||
| -rw-r--r-- | challenge-278/conor-hoekstra/ch-2.bqn | 9 |
2 files changed, 20 insertions, 0 deletions
diff --git a/challenge-278/conor-hoekstra/ch-1.bqn b/challenge-278/conor-hoekstra/ch-1.bqn new file mode 100644 index 0000000000..c56553c550 --- /dev/null +++ b/challenge-278/conor-hoekstra/ch-1.bqn @@ -0,0 +1,11 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/278-1.bqn + +⟨Words, Unwords⟩ ⇐ •Import "../lib/string.bqn" + +SortString ← Unwords·¯1⊸↓¨·(⍋¯1⊸↑¨)⊸⊏Words + +# Tests +•Show SortString "and2 Raku3 cousins5 Perl1 are4" # "Perl and Raku are cousins" +•Show SortString "guest6 Python1 most4 the3 popular5 is2 language7" # "Python is the most popular guest language" +•Show SortString "Challenge3 The1 Weekly2" # "The Weekly Challenge" diff --git a/challenge-278/conor-hoekstra/ch-2.bqn b/challenge-278/conor-hoekstra/ch-2.bqn new file mode 100644 index 0000000000..51d8e5c629 --- /dev/null +++ b/challenge-278/conor-hoekstra/ch-2.bqn @@ -0,0 +1,9 @@ +# For up to date code: +# https://github.com/codereport/bqn-code/blob/main/pwc/278-2.bqn + +ReverseWord ← (⊑0∾˜1+/∘=)(∧∘↑∾↓)⊢ + +# Tests +•Show 'e' ReverseWord "challenge" # "acehllnge" +•Show 'a' ReverseWord "programming" # "agoprrmming" +•Show 'b' ReverseWord "champion" # "champion" |
