aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Proctor <simon.proctor@zoopla.co.uk>2020-09-28 09:00:06 +0100
committerSimon Proctor <simon.proctor@zoopla.co.uk>2020-09-28 09:00:06 +0100
commitae5d269b72f3b247dfba99e434f9252bb5bb7f9b (patch)
treec92732bc8191555cee52dbe5b9683844e90447e5
parentaa14cbf8342e04b936f40bcc720a23a258137ecd (diff)
downloadperlweeklychallenge-club-ae5d269b72f3b247dfba99e434f9252bb5bb7f9b.tar.gz
perlweeklychallenge-club-ae5d269b72f3b247dfba99e434f9252bb5bb7f9b.tar.bz2
perlweeklychallenge-club-ae5d269b72f3b247dfba99e434f9252bb5bb7f9b.zip
Lowest unfound integer challenge
-rw-r--r--challenge-080/simon-proctor/raku/ch-1.raku11
1 files changed, 11 insertions, 0 deletions
diff --git a/challenge-080/simon-proctor/raku/ch-1.raku b/challenge-080/simon-proctor/raku/ch-1.raku
new file mode 100644
index 0000000000..2b86522724
--- /dev/null
+++ b/challenge-080/simon-proctor/raku/ch-1.raku
@@ -0,0 +1,11 @@
+#!/usr/bin/env raku
+
+use v6;
+
+#| Given a list of integers find the first positive integer not in the list.
+sub MAIN (
+ *@N where { $_.all ~~ Int } #= List of integers
+) {
+ say (1...*).first( * !~~ any(@N) );
+
+}