aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shitov <andy@shitov.ru>2021-12-06 09:48:20 +0100
committerAndrew Shitov <andy@shitov.ru>2021-12-06 09:48:20 +0100
commit96c183ebdf294d5c6fe57ae2059038e268333a72 (patch)
treee980959bb06189038e88f97ccd518ee1f1f47043
parentb9773f5c38387d865a093d2ecdfd1b01b4452c34 (diff)
downloadperlweeklychallenge-club-96c183ebdf294d5c6fe57ae2059038e268333a72.tar.gz
perlweeklychallenge-club-96c183ebdf294d5c6fe57ae2059038e268333a72.tar.bz2
perlweeklychallenge-club-96c183ebdf294d5c6fe57ae2059038e268333a72.zip
SleepSort by ash in Raku
-rw-r--r--challenge-142/ash/raku/ch-2.raku9
-rw-r--r--challenge-142/ash/raku/ch-2a.raku9
2 files changed, 18 insertions, 0 deletions
diff --git a/challenge-142/ash/raku/ch-2.raku b/challenge-142/ash/raku/ch-2.raku
new file mode 100644
index 0000000000..99044e8df6
--- /dev/null
+++ b/challenge-142/ash/raku/ch-2.raku
@@ -0,0 +1,9 @@
+# Running:
+# raku ./ch-2.raku 4 7 2 3 1 6
+
+await gather for @*ARGS {
+ take start {
+ sleep $_/10;
+ .say;
+ }
+}
diff --git a/challenge-142/ash/raku/ch-2a.raku b/challenge-142/ash/raku/ch-2a.raku
new file mode 100644
index 0000000000..73188cb254
--- /dev/null
+++ b/challenge-142/ash/raku/ch-2a.raku
@@ -0,0 +1,9 @@
+# Running:
+# raku ./ch-2a.raku 4 7 2 3 1 6
+
+await @*ARGS.map({
+ start {
+ sleep $_/10;
+ .say;
+ }
+})