diff --git a/exercises/associatives/seen-before.raku b/exercises/associatives/seen-before.raku index 440f5c935..b699f0d51 100644 --- a/exercises/associatives/seen-before.raku +++ b/exercises/associatives/seen-before.raku @@ -1,8 +1,12 @@ my %seen; loop { my $word = prompt 'Word: '; - if %seen{$word} { - say %seen{$word} == 1 ?? 'Seen!' !! say "Seen %seen{$word} times!"; - } %seen{$word}++; + + if %seen{$word} == 2 { + say 'Seen!'; + } + elsif %seen{$word} >= 3 { + say "Seen %seen{$word} times!"; + } }