aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-078/simon-proctor/raku/ch-1.raku10
1 files changed, 10 insertions, 0 deletions
diff --git a/challenge-078/simon-proctor/raku/ch-1.raku b/challenge-078/simon-proctor/raku/ch-1.raku
new file mode 100644
index 0000000000..82dc9168fe
--- /dev/null
+++ b/challenge-078/simon-proctor/raku/ch-1.raku
@@ -0,0 +1,10 @@
+#!/usr/bin/env raku
+
+use v6;
+
+# Given a list of number print all those larger than all the others left in the list
+sub MAIN(
+ *@a where { .all ~~ Int } #= List of integers
+) {
+ @a.kv.map( -> $i, $v { $v >= all(@a[$i..*]) ?? $v !! Empty }).join(", ").say;
+}