aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-09-13 06:16:35 +0200
committerMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-09-13 06:16:35 +0200
commit1336e9d06871f76059da4f2b8f0c685d2042600f (patch)
tree9cfe1cc748a53fc67f30b3c16639e73123bfeacf
parent0a43b3daca0f6b7b6cfaef12371256a84b1b9eb2 (diff)
downloadperlweeklychallenge-club-1336e9d06871f76059da4f2b8f0c685d2042600f.tar.gz
perlweeklychallenge-club-1336e9d06871f76059da4f2b8f0c685d2042600f.tar.bz2
perlweeklychallenge-club-1336e9d06871f76059da4f2b8f0c685d2042600f.zip
semicolons, comments, typos
-rw-r--r--challenge-077/markus-holzer/raku/ch-1.raku8
1 files changed, 3 insertions, 5 deletions
diff --git a/challenge-077/markus-holzer/raku/ch-1.raku b/challenge-077/markus-holzer/raku/ch-1.raku
index 44b5af60d4..4f22b7501a 100644
--- a/challenge-077/markus-holzer/raku/ch-1.raku
+++ b/challenge-077/markus-holzer/raku/ch-1.raku
@@ -14,14 +14,12 @@ with my @combinatons = gather combine zeckendorf $N
sub combine( @Z ) is cached
{
my &valid = -> $result {
- $result.elems == $result.unique.elems && $result !~~ @Z };
+ $result.elems == $result.unique.elems && $result !~~ @Z }
my &insert = -> $where, $what {
- my @x = @Z.clone; @x.splice( $where, 1, |$what ); @x };
+ my @x = @Z.clone; @x.splice( $where, 1, |$what ); @x }
- take @Z;
-
- sink @Z
+ take @Z and sink @Z
.map( &zeckendorf )
.kv.map( &insert )
.grep( &valid )