diff options
| author | Andrew Shitov <andy@shitov.ru> | 2020-07-06 21:39:27 +0200 |
|---|---|---|
| committer | Andrew Shitov <andy@shitov.ru> | 2020-07-06 21:39:27 +0200 |
| commit | 607844c07c34a215ae0b40cb3fafea119086960a (patch) | |
| tree | b11aa55992dba06ffa55fe648427b63965a6c01f /challenge-068/ash | |
| parent | e4afc46c855125006a9cb7ba36a4b4157cc2bdd6 (diff) | |
| download | perlweeklychallenge-club-607844c07c34a215ae0b40cb3fafea119086960a.tar.gz perlweeklychallenge-club-607844c07c34a215ae0b40cb3fafea119086960a.tar.bz2 perlweeklychallenge-club-607844c07c34a215ae0b40cb3fafea119086960a.zip | |
Fix the solution
Diffstat (limited to 'challenge-068/ash')
| -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"); |
