aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad Sajid Anwar <Mohammad.Anwar@yahoo.com>2024-02-22 11:03:32 +0000
committerGitHub <noreply@github.com>2024-02-22 11:03:32 +0000
commitfd76d55c8a19ff6863538c2aadca0e4da39879ee (patch)
treea86d81a306e7b4184c73f3ecdd130e864ee591ed
parent8391a43b1e838793d7b00fed2f7bfc4ce7b9783c (diff)
parent2cd039282886786a56848441be3edff519e70da0 (diff)
downloadperlweeklychallenge-club-fd76d55c8a19ff6863538c2aadca0e4da39879ee.tar.gz
perlweeklychallenge-club-fd76d55c8a19ff6863538c2aadca0e4da39879ee.tar.bz2
perlweeklychallenge-club-fd76d55c8a19ff6863538c2aadca0e4da39879ee.zip
Merge pull request #9626 from andemark/challenge-257
ch-2.raku final final :)
-rw-r--r--challenge-257/mark-anderson/raku/ch-2.raku6
1 files changed, 3 insertions, 3 deletions
diff --git a/challenge-257/mark-anderson/raku/ch-2.raku b/challenge-257/mark-anderson/raku/ch-2.raku
index f772c06ebd..f61ebc906a 100644
--- a/challenge-257/mark-anderson/raku/ch-2.raku
+++ b/challenge-257/mark-anderson/raku/ch-2.raku
@@ -65,7 +65,7 @@ sub reduced-row-echelon(+@m)
# rows with all zeroes are grouped at the bottom
with $k
{
- return False unless all(@pivots[$k..*]) ~~ Any;
+ return False unless all(@pivots[$k..*]) eqv Any;
@pivots = @pivots[^$k];
return True unless @pivots
}
@@ -81,8 +81,8 @@ sub reduced-row-echelon(+@m)
# @m should be an identity matrix at this point if it is RREF
# all pivots are ones
- return False unless squish(@m.keys.map({ |@m[$_].splice($_,1) })) ~~ (1,);
+ return False unless all(@m.keys.map({ |@m[$_].splice($_,1) })) == 1;
# everything else is zeroes
- return squish(@m[*;*]) ~~ (0,)
+ return all(@m[*;*]) == 0
}