From a1ee4822771957e34d6990e35c272c8da183027d Mon Sep 17 00:00:00 2001 From: Andinus Date: Sat, 11 Sep 2021 18:47:44 +0530 Subject: Raku: Complete Phone Number & RNA Transcription --- README.org | 6 +++--- raku/phone-number/Phone.rakumod | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.org b/README.org index e63a1ca..35b637f 100644 --- a/README.org +++ b/README.org @@ -72,7 +72,7 @@ My solutions for [[https://exercism.io][Exercism]] exercises. - [X] Two Fer - [X] Raindrops -* Raku [12/14] +* Raku [14/15] - [X] Hello World - [X] Two Fer @@ -86,8 +86,8 @@ My solutions for [[https://exercism.io][Exercism]] exercises. - [X] Word Count - [X] Raindrops - [X] Luhn -- [ ] Phone Number -- [ ] RNA Transcription +- [X] Phone Number +- [X] RNA Transcription - [ ] Acronym * Rust [2/4] diff --git a/raku/phone-number/Phone.rakumod b/raku/phone-number/Phone.rakumod index 66a9e24..0761246 100644 --- a/raku/phone-number/Phone.rakumod +++ b/raku/phone-number/Phone.rakumod @@ -18,7 +18,7 @@ sub clean-number(Str $number --> Str) is export { # matches "("; die @errors[4] if $number.contains: /<[!:]>/; - my Int @num = $number.comb.grep(/\d/)>>.Int; + my Int @num = $number.comb(/\d/)>>.Int; given @num { when .elems == 11 { die @errors[0] if .[0] !== 1; -- cgit 1.4.1-2-gfad0