aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author冯昶 <seaker@qq.com>2021-01-07 21:29:02 +0800
committer冯昶 <seaker@qq.com>2021-01-07 21:29:02 +0800
commit865acfd056fb6f409ec6b1a81d60b931cbcb69fe (patch)
treec83cf4afb2c63c299058ce97950feaa325970a7a
parent1bbb8f12e1d69d8fd57365619e3ebadfdaaa28c6 (diff)
downloadperlweeklychallenge-club-865acfd056fb6f409ec6b1a81d60b931cbcb69fe.tar.gz
perlweeklychallenge-club-865acfd056fb6f409ec6b1a81d60b931cbcb69fe.tar.bz2
perlweeklychallenge-club-865acfd056fb6f409ec6b1a81d60b931cbcb69fe.zip
challenge #044, task #1, raku solution
-rwxr-xr-xchallenge-044/feng-chang/ch-1.raku11
1 files changed, 5 insertions, 6 deletions
diff --git a/challenge-044/feng-chang/ch-1.raku b/challenge-044/feng-chang/ch-1.raku
index 07e0cb40e8..c7691dd4a8 100755
--- a/challenge-044/feng-chang/ch-1.raku
+++ b/challenge-044/feng-chang/ch-1.raku
@@ -5,11 +5,10 @@ use MONKEY-SEE-NO-EVAL;
my @even = 0, 2 ... 16;
my @odd = 1, 3 ... 15;
-my @a;
-@a[@even] = '123456789'.comb».UInt;
-
-for [X] (['', '+', '-'] xx 8) -> @ops {
- @a[@odd] = @ops;
+([X] (['', '+', '-'] xx 8)).race(degree => 2, batch => 200).map({
+ my @a;
+ @a[@even] = '123456789'.comb;
+ @a[@odd] = $_;
my $s = @a.join;
put $s if EVAL($s) == 100;
-}
+});