diff options
author | Andinus <andinus@nand.sh> | 2021-09-08 22:26:42 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-09-08 22:26:42 +0530 |
commit | 39a144c85aa4229345463280d4f61266350a6527 (patch) | |
tree | 15b7c9aeedfaee8700c8e79b1f73c0716de23a13 /raku/acronym/Acronym.rakumod | |
parent | 2cccd54aaa588c7446417b00c6ece21f69fbd8ec (diff) | |
download | exercism-39a144c85aa4229345463280d4f61266350a6527.tar.gz |
Raku: Acronym: Add solution
Diffstat (limited to 'raku/acronym/Acronym.rakumod')
-rw-r--r-- | raku/acronym/Acronym.rakumod | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/raku/acronym/Acronym.rakumod b/raku/acronym/Acronym.rakumod new file mode 100644 index 0000000..401d867 --- /dev/null +++ b/raku/acronym/Acronym.rakumod @@ -0,0 +1,5 @@ +unit module Acronym; + +sub abbreviate(Str $phrase --> Str) is export { + $phrase.split((' ', '-'), :skip-empty).map(*.comb(/<[a..zA..Z]>/).first).join.uc +} |