aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-03-23 19:01:36 +0100
committerMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-03-23 19:01:36 +0100
commit43d3f2d6f66fe46910b9b2068504a62d4726683f (patch)
tree000c8f8b408a99ca1f3ceec603bb796eeadfbcf9
parentd6cdf3086d99b94882b09ed727a42ed3956484ef (diff)
downloadperlweeklychallenge-club-43d3f2d6f66fe46910b9b2068504a62d4726683f.tar.gz
perlweeklychallenge-club-43d3f2d6f66fe46910b9b2068504a62d4726683f.tar.bz2
perlweeklychallenge-club-43d3f2d6f66fe46910b9b2068504a62d4726683f.zip
boring solutions
-rw-r--r--challenge-053/markus-holzer/raku/ch-1.p66
-rw-r--r--challenge-053/markus-holzer/raku/ch-2.p66
2 files changed, 6 insertions, 6 deletions
diff --git a/challenge-053/markus-holzer/raku/ch-1.p6 b/challenge-053/markus-holzer/raku/ch-1.p6
index 4b8305ab24..47247f6c50 100644
--- a/challenge-053/markus-holzer/raku/ch-1.p6
+++ b/challenge-053/markus-holzer/raku/ch-1.p6
@@ -1,6 +1,6 @@
multi sub MAIN( Int:D $degrees where * ~~ 90|180|270|360 )
{
- my @matrix[3,3] = (1..9).batch(3);
+ my @matrix[ 3, 3 ] = ( 1..9 ).batch( 3 );
my $times = $degrees / 90;
clockwise( @matrix ) for ^$times;
@@ -11,7 +11,7 @@ multi sub MAIN( Int:D $degrees where * ~~ 90|180|270|360 )
sub clockwise( @matrix )
{
my $n = @matrix.elems;
- my $x = ($n / 2).floor;
+ my $x = ( $n / 2 ).floor;
my $y = $n - 1;
for ^$x -> $i
@@ -20,7 +20,7 @@ sub clockwise( @matrix )
{
my $dj = $y - $j;
my $di = $y - $i;
- my $k = @matrix[$i;$j];
+ my $k = @matrix[ $i; $j ];
@matrix[ $i; $j ] = @matrix[ $dj; $i ];
@matrix[ $dj; $i ] = @matrix[ $di; $dj ];
diff --git a/challenge-053/markus-holzer/raku/ch-2.p6 b/challenge-053/markus-holzer/raku/ch-2.p6
index 344c61963c..ff0d8689a6 100644
--- a/challenge-053/markus-holzer/raku/ch-2.p6
+++ b/challenge-053/markus-holzer/raku/ch-2.p6
@@ -17,12 +17,12 @@ multi sub build-str( $n, $current )
{
my $last = $current.substr( * - 1, 1 );
- for <a e i o u> -> $vovel
+ for @vowels
{
next
- unless %rules{ $vovel }( $last );
+ unless %rules{ $_ }( $last );
- given $current ~ $vovel
+ given $current ~ $_
{
take $_ and next
if .chars == $n;