aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Lynn <bizlsg@localhost.localdomain>2022-12-23 15:31:48 +0800
committerStephen Lynn <bizlsg@localhost.localdomain>2022-12-23 15:31:48 +0800
commit8607b50701e8d7f84d8c0dbe47acbfc2ec4bf3ce (patch)
treeb54bab9e3181a4a49f136471e30a711f27f037a6
parent9f4638ad276b82478c335fec5ec2a240ae109195 (diff)
downloadperlweeklychallenge-club-8607b50701e8d7f84d8c0dbe47acbfc2ec4bf3ce.tar.gz
perlweeklychallenge-club-8607b50701e8d7f84d8c0dbe47acbfc2ec4bf3ce.tar.bz2
perlweeklychallenge-club-8607b50701e8d7f84d8c0dbe47acbfc2ec4bf3ce.zip
minor fix ch-2.p6
-rwxr-xr-xchallenge-196/steve-g-lynn/raku/ch-2.p62
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-196/steve-g-lynn/raku/ch-2.p6 b/challenge-196/steve-g-lynn/raku/ch-2.p6
index 9c6a14f2c5..2fadb00f71 100755
--- a/challenge-196/steve-g-lynn/raku/ch-2.p6
+++ b/challenge-196/steve-g-lynn/raku/ch-2.p6
@@ -7,7 +7,7 @@ say &range-list((0,1,2,4,5,6,8,9)); #([0,2],[4,6],[8,9])
sub range-list( @array) {
my @arry=@array.sort({$^a <=> $^b}).unique; #-- just in case ...
- @arry=@arry.unshift(-Inf).push(-Inf);
+ @arry.unshift(-Inf).push(-Inf);
&print-edges( @arry[(1 .. @arry-2).grep({(@arry[$_]-@arry[$_-1]==1) || (@arry[$_+1]-@arry[$_]==1)})] );
}