diff options
| -rw-r--r-- | challenge-217/mark-anderson/raku/ch-1.raku | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/challenge-217/mark-anderson/raku/ch-1.raku b/challenge-217/mark-anderson/raku/ch-1.raku index bad514c662..6b41a8d86d 100644 --- a/challenge-217/mark-anderson/raku/ch-1.raku +++ b/challenge-217/mark-anderson/raku/ch-1.raku @@ -1,11 +1,12 @@ #!/usr/bin/env raku use Test; -is sorted-matrix([3, 1, 2], [5, 2, 4], [0, 1, 3]), 1; -is sorted-matrix([2, 1], [4, 5]), 4; -is sorted-matrix([1, 0, 3], [0, 0, 0], [1, 2, 1]), 0; +is sorted-matrix([3,1,2], [5,2,4], [0,1,3]), 1; +is sorted-matrix([2,1], [4,5]), 4; +is sorted-matrix([1,0,3], [0,0,0], [1,2,1]), 0; +is sorted-matrix([1,2,3,4], [[4,-85,9], [2,-57, [1,2,3,-42], [[0],[1,2]]]], [-3,43]), -42; sub sorted-matrix(+$a) { - $a.comb(/\d+/).sort(+*)[2]; + $a.comb(/<[-\d]>+/).sort(+*)[2] } |
