aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2021-03-30 02:17:19 +0100
committerGitHub <noreply@github.com>2021-03-30 02:17:19 +0100
commit86c6fa9032efc7b5b1fa8a5b71662531f9da236b (patch)
treea7bb2a2483cccb9dfbf9dea0b29a918a0fe71802
parent248e6239f3d4a3585e96ee3f2a80ec6eeb1f2180 (diff)
parentb9fe67bec49a32c8e3362c3413b66eb647cdde23 (diff)
downloadperlweeklychallenge-club-86c6fa9032efc7b5b1fa8a5b71662531f9da236b.tar.gz
perlweeklychallenge-club-86c6fa9032efc7b5b1fa8a5b71662531f9da236b.tar.bz2
perlweeklychallenge-club-86c6fa9032efc7b5b1fa8a5b71662531f9da236b.zip
Merge pull request #3795 from Scimon/master
Challenge 1
-rw-r--r--challenge-106/simon-proctor/raku/ch-1.raku9
1 files changed, 9 insertions, 0 deletions
diff --git a/challenge-106/simon-proctor/raku/ch-1.raku b/challenge-106/simon-proctor/raku/ch-1.raku
new file mode 100644
index 0000000000..5098a59729
--- /dev/null
+++ b/challenge-106/simon-proctor/raku/ch-1.raku
@@ -0,0 +1,9 @@
+#!/usr/bin/env raku
+
+
+multi sub MAIN ( $ ) is hidden-from-USAGE { say 0 }
+
+#| Given a list of numbers print the largest distance between them when sorted
+multi sub MAIN ( *@a where *.elems > 1 ) {
+ @a.sort.rotor(2 => -1).map( { $^a[1] - $^a[0] } ).max.say;
+}