diff options
| -rw-r--r-- | challenge-068/ash/raku/ch-1.raku | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/challenge-068/ash/raku/ch-1.raku b/challenge-068/ash/raku/ch-1.raku index 2da304eab0..1dc13f9803 100644 --- a/challenge-068/ash/raku/ch-1.raku +++ b/challenge-068/ash/raku/ch-1.raku @@ -10,9 +10,11 @@ my @input = [1, 1, 1], [1, 1, 1]; -for empty_lines(@input) X empty_lines([Z] @input) -> ($row, $col) { - @input[$row][$_] = 0 for ^@input[0]; - @input[$_][$col] = 0 for ^@input; +my @rows = empty_lines(@input); +my @cols = empty_lines([Z] @input); + +for ((@rows X ^@input[0]), (^@input X @cols)).flat -> $row, $col { + @input[$row][$col] = 0; } say @input.join("\n"); |
