diff options
| author | 冯昶 <fengchang@novel-supertv.com> | 2024-07-09 10:06:31 +0800 |
|---|---|---|
| committer | 冯昶 <fengchang@novel-supertv.com> | 2024-07-09 10:06:31 +0800 |
| commit | 894abedddc120cf679f3aae060e0dcd6a7325dd1 (patch) | |
| tree | b43a4b53ca0e2d4c4661f4bf1456ae8d21dfa169 | |
| parent | 293baa61f92e59d94061a36e8e11e6e6da850e7a (diff) | |
| download | perlweeklychallenge-club-894abedddc120cf679f3aae060e0dcd6a7325dd1.tar.gz perlweeklychallenge-club-894abedddc120cf679f3aae060e0dcd6a7325dd1.tar.bz2 perlweeklychallenge-club-894abedddc120cf679f3aae060e0dcd6a7325dd1.zip | |
fix
| -rwxr-xr-x | challenge-277/feng-chang/raku/ch-1a.raku | 2 | ||||
| -rwxr-xr-x | challenge-277/feng-chang/raku/test.raku | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/challenge-277/feng-chang/raku/ch-1a.raku b/challenge-277/feng-chang/raku/ch-1a.raku index 00694b6dee..909e2a1cbf 100755 --- a/challenge-277/feng-chang/raku/ch-1a.raku +++ b/challenge-277/feng-chang/raku/ch-1a.raku @@ -2,4 +2,4 @@ unit sub MAIN(Str:D \s1, Str:D \s2); -put +[(&)] (s1, s2).map({ .cache.grep(.one) with .words }); +put +[(&)] (s1, s2).map({ .grep(.one) with .words.List }); diff --git a/challenge-277/feng-chang/raku/test.raku b/challenge-277/feng-chang/raku/test.raku index bdf1bbbc1e..9c16d2aa82 100755 --- a/challenge-277/feng-chang/raku/test.raku +++ b/challenge-277/feng-chang/raku/test.raku @@ -20,6 +20,12 @@ pwc-test './ch-1.raku', 'Perl and Python are very similar', 'Python is top in gu 'Count Common: <Perl and Python are very similar>, <Python is top in guest languages> => 1'; pwc-test './ch-1.raku', 'Perl is imperative Lisp is functional', 'Crystal is similar to Ruby', 0, 'Count Common: <Perl is imperative Lisp is functional>, <Crystal is similar to Ruby> => 0'; +pwc-test './ch-1a.raku', 'Perl is my friend', 'Perl and Raku are friend', 2, + 'Count Common: <Perl is my friend>, <Perl and Raku are friend> => 2'; +pwc-test './ch-1a.raku', 'Perl and Python are very similar', 'Python is top in guest languages', 1, + 'Count Common: <Perl and Python are very similar>, <Python is top in guest languages> => 1'; +pwc-test './ch-1a.raku', 'Perl is imperative Lisp is functional', 'Crystal is similar to Ruby', 0, + 'Count Common: <Perl is imperative Lisp is functional>, <Crystal is similar to Ruby> => 0'; # Task 2, Strong Pair pwc-test './ch-2.raku', <1 2 3 4 5>, 4, 'Strong Pair: 1, 2, 3, 4, 5 => 4'; |
