Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Use "for" loop instead of "loop".

I believe "for" caused problems previously, but they shouldn't exist anymore.
  • Loading branch information...
commit 97948ccf01c0cc55d20ff3d2813e3da6c4026c49 1 parent da7a1d9
Konrad Borowski authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/Text/Abbrev.pm
View
2  lib/Text/Abbrev.pm
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.