Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use "for" loop instead of "loop".
I believe "for" caused problems previously, but they shouldn't exist anymore.
  • Loading branch information
Konrad Borowski committed Sep 12, 2013
1 parent da7a1d9 commit 97948cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Text/Abbrev.pm
Expand Up @@ -3,7 +3,7 @@ multi sub abbrev (*@words) is export {
my $seen = KeySet.new;
my %result;
for @words {
loop (my $len = .chars; $len > 0; --$len) {
for 1 .. .chars -> $len {
my $abbrev = .substr(0, $len);
if $seen{$abbrev} {
%result.delete: $abbrev;
Expand Down

0 comments on commit 97948cc

Please sign in to comment.