aboutsummaryrefslogtreecommitdiff
path: root/challenge-077/stuart-little/raku/ch-1.p6
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-077/stuart-little/raku/ch-1.p6')
-rwxr-xr-xchallenge-077/stuart-little/raku/ch-1.p612
1 files changed, 12 insertions, 0 deletions
diff --git a/challenge-077/stuart-little/raku/ch-1.p6 b/challenge-077/stuart-little/raku/ch-1.p6
new file mode 100755
index 0000000000..cab30285d6
--- /dev/null
+++ b/challenge-077/stuart-little/raku/ch-1.p6
@@ -0,0 +1,12 @@
+#!/usr/bin/env perl6
+use v6;
+
+sub fibsum($n) {
+ (1,2,* + * ... * >= $n)
+ .combinations
+ .grep(*.sum == $n)
+}
+
+for (fibsum(@*ARGS.[0].Int)) { .say }
+
+# run as <script> <number>