From 39a144c85aa4229345463280d4f61266350a6527 Mon Sep 17 00:00:00 2001 From: Andinus Date: Wed, 8 Sep 2021 22:26:42 +0530 Subject: Raku: Acronym: Add solution --- raku/acronym/Acronym.rakumod | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 raku/acronym/Acronym.rakumod (limited to 'raku/acronym/Acronym.rakumod') 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 +} -- cgit 1.4.1-2-gfad0