aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Holzer <holli@MacBook-Air-von-Markus.fritz.box>2021-07-23 23:59:40 +0200
committerMarkus Holzer <holli@MacBook-Air-von-Markus.fritz.box>2021-07-23 23:59:40 +0200
commitcc8d214f046b738b707efe87e6f6dcbcb89cb83e (patch)
treebed36cc2673cc2f9c6a972972abecea38a67ca25
parent0f0c14b8edf86f5cbfffe322b2230771d383dd6f (diff)
downloadperlweeklychallenge-club-cc8d214f046b738b707efe87e6f6dcbcb89cb83e.tar.gz
perlweeklychallenge-club-cc8d214f046b738b707efe87e6f6dcbcb89cb83e.tar.bz2
perlweeklychallenge-club-cc8d214f046b738b707efe87e6f6dcbcb89cb83e.zip
Initial
-rw-r--r--challenge-122/markus-holzer/raku/ch-1.raku1
-rw-r--r--challenge-122/markus-holzer/raku/ch-2.raku12
2 files changed, 13 insertions, 0 deletions
diff --git a/challenge-122/markus-holzer/raku/ch-1.raku b/challenge-122/markus-holzer/raku/ch-1.raku
new file mode 100644
index 0000000000..f2e34a40d0
--- /dev/null
+++ b/challenge-122/markus-holzer/raku/ch-1.raku
@@ -0,0 +1 @@
+say ( [\+] 10, 20 ... 90 ) Z/ 1 .. Inf; \ No newline at end of file
diff --git a/challenge-122/markus-holzer/raku/ch-2.raku b/challenge-122/markus-holzer/raku/ch-2.raku
new file mode 100644
index 0000000000..39128f21c1
--- /dev/null
+++ b/challenge-122/markus-holzer/raku/ch-2.raku
@@ -0,0 +1,12 @@
+# Write a script to find out the different ways you can score $S points in basketball
+
+multi points( $S, *@c where @c.sum == $S ) {
+ take @c and nextsame;
+}
+
+multi points( $S, *@c where @c.sum <= $S ) {
+ points $S, @c, $_ for 1..3 }
+
+multi points( | ) { }
+
+say gather points 6; \ No newline at end of file