diff options
| -rw-r--r-- | challenge-235/bob-lied/perl/ch-1.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/challenge-235/bob-lied/perl/ch-1.pl b/challenge-235/bob-lied/perl/ch-1.pl index 10b33b72be..06ce8fe5cf 100644 --- a/challenge-235/bob-lied/perl/ch-1.pl +++ b/challenge-235/bob-lied/perl/ch-1.pl @@ -39,12 +39,13 @@ sub removeOne(@ints) return $rmvCount < 2; } -# Map each pair to true/false for being sorteed ascending. Count the falses. +# Map each pair to true/false for being sorted ascending. Count the falses. # Will be inefficient if the list is long and the out-of-order elements are # near the front. sub ro_A(@ints) { - my $rmvCount = grep { $_ == false } map { $ints[$_] < $ints[$_+1] } 0 .. ( $#ints-1 ); + my $rmvCount = grep { $_ == false } + map { $ints[$_] < $ints[$_+1] } 0 .. ( $#ints-1 ); return $rmvCount < 2; } |
