aboutsummaryrefslogtreecommitdiff
path: root/challenge-084/markus-holzer
diff options
context:
space:
mode:
authorMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-10-26 22:55:17 +0100
committerMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-10-26 22:55:17 +0100
commit23e4b5babc2f84a283f4e4812a7196df8c529b16 (patch)
tree032a42204ec71947a2e9f5a5dc6bd8eb526a44ab /challenge-084/markus-holzer
parent8fc53a31e341146719c94901b72125e106edc5ae (diff)
downloadperlweeklychallenge-club-23e4b5babc2f84a283f4e4812a7196df8c529b16.tar.gz
perlweeklychallenge-club-23e4b5babc2f84a283f4e4812a7196df8c529b16.tar.bz2
perlweeklychallenge-club-23e4b5babc2f84a283f4e4812a7196df8c529b16.zip
removed now pointless comment
Diffstat (limited to 'challenge-084/markus-holzer')
-rw-r--r--challenge-084/markus-holzer/raku/ch-2.raku18
1 files changed, 9 insertions, 9 deletions
diff --git a/challenge-084/markus-holzer/raku/ch-2.raku b/challenge-084/markus-holzer/raku/ch-2.raku
index 0b8e65ee29..99a12052b8 100644
--- a/challenge-084/markus-holzer/raku/ch-2.raku
+++ b/challenge-084/markus-holzer/raku/ch-2.raku
@@ -5,15 +5,15 @@ my @matrix[4,8] =
< 1 0 1 1 1 0 1 1 >;
my ( $h, $w ) = @matrix.shape;
-my @s = gather for [X] 0..^$h, 0..^$w -> ($r, $c) {
- # I had no idea min is also an infix until yesterdays review video
- for $r ^..^ $h -> $R {
- for $c ^..^ $w -> $C {
- take $r, $c, $R-$r, $C-$c if
- @matrix[$R;$C] &&
- @matrix[$R;$c] &&
- @matrix[$r;$C] &&
- @matrix[$r;$c] }}}
+my @s = gather
+ for [X] 0..^$h, 0..^$w -> ($r, $c) {
+ for $r ^..^ $h -> $R {
+ for $c ^..^ $w -> $C {
+ take $r, $c, $R-$r, $C-$c if
+ @matrix[$R;$C] &&
+ @matrix[$R;$c] &&
+ @matrix[$r;$C] &&
+ @matrix[$r;$c] }}}
say +@s;
"r: {.[0]+1}, c:{.[1]+1}, {.[2]+1}x{.[3]+1}".say for @s; #.sort( *.[2,3] );