aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-03-23 23:33:55 +0100
committerMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-03-23 23:33:55 +0100
commitf9d61e3cb5a881fc5a133a424c840817e5ddbbac (patch)
tree1a00e80a30402fa1f596a46f89fe1163c99fb8ee
parentd1c7d682e5bb7dcb7602e80a815491e78859a7f8 (diff)
downloadperlweeklychallenge-club-f9d61e3cb5a881fc5a133a424c840817e5ddbbac.tar.gz
perlweeklychallenge-club-f9d61e3cb5a881fc5a133a424c840817e5ddbbac.tar.bz2
perlweeklychallenge-club-f9d61e3cb5a881fc5a133a424c840817e5ddbbac.zip
final
-rw-r--r--challenge-053/markus-holzer/raku/ch-1.p67
1 files changed, 2 insertions, 5 deletions
diff --git a/challenge-053/markus-holzer/raku/ch-1.p6 b/challenge-053/markus-holzer/raku/ch-1.p6
index 678c117972..08765fa5bb 100644
--- a/challenge-053/markus-holzer/raku/ch-1.p6
+++ b/challenge-053/markus-holzer/raku/ch-1.p6
@@ -1,11 +1,8 @@
-multi sub infix:<times>( Int $n, Callable $b --> Nil ) is looser(&infix:<+>) { &$b($_) for ^$n; }
-multi sub infix:<times>( Numeric $n, Callable $b --> Nil ) is looser(&infix:<+>) { &$b($_) for ^($n.Int); }
-
sub MAIN( Int $degrees where * %% 90, :$size = 3 )
{
- my @matrix[ $size, $size ] = ( 1..$size² ).batch( $size );
+ my @matrix[ $size, $size ] = ( 1..$size² ).batch( $size );
- $degrees / 90 times { @matrix.&clockwise };
+ clockwise( @matrix ) for ^( $degrees / 90 );
dd @matrix;
}