diff options
| author | Mohammad Sajid Anwar <Mohammad.Anwar@yahoo.com> | 2024-07-29 01:25:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-29 01:25:37 +0100 |
| commit | cdee2f27e3041059589fc99167398c36605f13fc (patch) | |
| tree | a020180880806763ee5ddc1249352304cf4113d3 | |
| parent | f9e7a5e57178b15bdc880eaf6a4f67766cac355d (diff) | |
| parent | db3e5c8232e72ebd33336e0df52d8a15612993f7 (diff) | |
| download | perlweeklychallenge-club-cdee2f27e3041059589fc99167398c36605f13fc.tar.gz perlweeklychallenge-club-cdee2f27e3041059589fc99167398c36605f13fc.tar.bz2 perlweeklychallenge-club-cdee2f27e3041059589fc99167398c36605f13fc.zip | |
Merge pull request #10503 from andemark/challenge-279
Removed useless combs. Thanks, Bruce! 😊
| -rw-r--r-- | challenge-279/mark-anderson/raku/ch-2.raku | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-279/mark-anderson/raku/ch-2.raku b/challenge-279/mark-anderson/raku/ch-2.raku index 1251f5a5d3..c674e58a6d 100644 --- a/challenge-279/mark-anderson/raku/ch-2.raku +++ b/challenge-279/mark-anderson/raku/ch-2.raku @@ -15,7 +15,7 @@ sub split-string($str is copy) for $str.words.grep({ .contains('y') }) -> $word { - if $word.comb.contains(none(<a e i o u>)) + if $word.contains(none(<a e i o u>)) { $count += ($word ~~ m:g/y/).elems; next @@ -33,7 +33,7 @@ sub split-string($str is copy) for @syllables { next unless .contains('y'); - $count += (.comb.indices('y').grep(* > 0)).elems + $count += (.indices('y').grep(* > 0)).elems } } |
