From 894abedddc120cf679f3aae060e0dcd6a7325dd1 Mon Sep 17 00:00:00 2001 From: 冯昶 Date: Tue, 9 Jul 2024 10:06:31 +0800 Subject: fix --- challenge-277/feng-chang/raku/ch-1a.raku | 2 +- challenge-277/feng-chang/raku/test.raku | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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: , => 1'; pwc-test './ch-1.raku', 'Perl is imperative Lisp is functional', 'Crystal is similar to Ruby', 0, 'Count Common: , => 0'; +pwc-test './ch-1a.raku', 'Perl is my friend', 'Perl and Raku are friend', 2, + 'Count Common: , => 2'; +pwc-test './ch-1a.raku', 'Perl and Python are very similar', 'Python is top in guest languages', 1, + 'Count Common: , => 1'; +pwc-test './ch-1a.raku', 'Perl is imperative Lisp is functional', 'Crystal is similar to Ruby', 0, + 'Count Common: , => 0'; # Task 2, Strong Pair pwc-test './ch-2.raku', <1 2 3 4 5>, 4, 'Strong Pair: 1, 2, 3, 4, 5 => 4'; -- cgit