Permalink
Browse files

Use "for" loop instead of "loop".

I believe "for" caused problems previously, but they shouldn't exist anymore.
  • Loading branch information...
1 parent da7a1d9 commit 97948ccf01c0cc55d20ff3d2813e3da6c4026c49 @xfix committed Sep 12, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/Text/Abbrev.pm
View
@@ -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;

0 comments on commit 97948cc

Please sign in to comment.