aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark <53903062+andemark@users.noreply.github.com>2024-02-20 10:23:02 +0000
committerMark <53903062+andemark@users.noreply.github.com>2024-02-20 10:23:02 +0000
commit70c36ac3ee4750d0b99f9600f9b2aae1a32e4d1c (patch)
treee7cc1d53f22a4b4583107dc0b371ee573dd6aa4b
parent59ca52f10ee43755c07cc65f75cfec0c60904b22 (diff)
downloadperlweeklychallenge-club-70c36ac3ee4750d0b99f9600f9b2aae1a32e4d1c.tar.gz
perlweeklychallenge-club-70c36ac3ee4750d0b99f9600f9b2aae1a32e4d1c.tar.bz2
perlweeklychallenge-club-70c36ac3ee4750d0b99f9600f9b2aae1a32e4d1c.zip
Challenge 257 Solutions (Raku)
-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 412ac4cf4b..91000c85d5 100644
--- a/challenge-257/mark-anderson/raku/ch-2.raku
+++ b/challenge-257/mark-anderson/raku/ch-2.raku
@@ -46,7 +46,7 @@ ok reduced-row-echelon([1, 0, 0, 0, 0],
sub reduced-row-echelon(+@m)
{
# the first non-zero number in a row is the pivot
- my @pivots = @m>>.first(*.so, :p);
+ my @pivots = @m>>.first(*.so, :kv);
# the first row that is all zeroes
my $k = @pivots.first(*.not, :k);
@@ -58,8 +58,8 @@ sub reduced-row-echelon(+@m)
@pivots = @pivots[^$k]
}
- my @keys = @pivots>>.keys>>[0];
- @pivots = @pivots>>.values>>[0];
+ my @keys = @pivots>>[0];
+ @pivots = @pivots>>[1];
# all pivots == 1
return False unless all(@pivots) == 1;