diff options
author | Andinus <andinus@nand.sh> | 2021-09-11 18:47:44 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-09-11 18:47:44 +0530 |
commit | a1ee4822771957e34d6990e35c272c8da183027d (patch) | |
tree | 5980d69a7d48b420ecd733250594fbddc0c5358c | |
parent | 9df866b411301652683cfc546fef561a006ea9b1 (diff) | |
download | exercism-a1ee4822771957e34d6990e35c272c8da183027d.tar.gz |
Raku: Complete Phone Number & RNA Transcription
-rw-r--r-- | README.org | 6 | ||||
-rw-r--r-- | 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 { # <punct> 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; |