aboutsummaryrefslogtreecommitdiff
path: root/challenge-059/shahed-nooshmand/raku
diff options
context:
space:
mode:
authorMohammad S Anwar <mohammad.anwar@yahoo.com>2020-05-10 17:39:05 +0100
committerMohammad S Anwar <mohammad.anwar@yahoo.com>2020-05-10 17:39:05 +0100
commiteb1db8b394ec3f1e49b744d7f3d669e84961d78d (patch)
tree46bd178b6d85060b064c6c7d67bb5bced8e38318 /challenge-059/shahed-nooshmand/raku
parenteb90cc63dd76b39c4747979c79fc845c1bc91341 (diff)
downloadperlweeklychallenge-club-eb1db8b394ec3f1e49b744d7f3d669e84961d78d.tar.gz
perlweeklychallenge-club-eb1db8b394ec3f1e49b744d7f3d669e84961d78d.tar.bz2
perlweeklychallenge-club-eb1db8b394ec3f1e49b744d7f3d669e84961d78d.zip
- Added solutions by Shahed Nooshmand.
Diffstat (limited to 'challenge-059/shahed-nooshmand/raku')
-rw-r--r--challenge-059/shahed-nooshmand/raku/ch-1.sh1
-rw-r--r--challenge-059/shahed-nooshmand/raku/ch-2.sh1
2 files changed, 2 insertions, 0 deletions
diff --git a/challenge-059/shahed-nooshmand/raku/ch-1.sh b/challenge-059/shahed-nooshmand/raku/ch-1.sh
new file mode 100644
index 0000000000..4a2317b4e3
--- /dev/null
+++ b/challenge-059/shahed-nooshmand/raku/ch-1.sh
@@ -0,0 +1 @@
+raku -e 'put join " → ", |.grep(* < 3), |.grep(* ≥ 3) given « 1 4 3 2 5 2 »'
diff --git a/challenge-059/shahed-nooshmand/raku/ch-2.sh b/challenge-059/shahed-nooshmand/raku/ch-2.sh
new file mode 100644
index 0000000000..8ad73fd703
--- /dev/null
+++ b/challenge-059/shahed-nooshmand/raku/ch-2.sh
@@ -0,0 +1 @@
+raku -e '(2..4).combinations(2).map({ (.comb Z≠ sprintf("\%0{.chars}b", @_.min).comb).grep(1) given @_.max.base(2) }).sum.say'