diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2020-09-12 20:29:59 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2020-09-12 20:29:59 +0100 |
| commit | 8ac7cd31bbdc654205d7676c0f9f619ac5e4657e (patch) | |
| tree | 4fa80432584168aff825a4a29ff067d46103ee51 /challenge-077/shahed-nooshmand | |
| parent | b7027b9a838c13ab54de3baa7ca520cd33219763 (diff) | |
| download | perlweeklychallenge-club-8ac7cd31bbdc654205d7676c0f9f619ac5e4657e.tar.gz perlweeklychallenge-club-8ac7cd31bbdc654205d7676c0f9f619ac5e4657e.tar.bz2 perlweeklychallenge-club-8ac7cd31bbdc654205d7676c0f9f619ac5e4657e.zip | |
- Added solutions by Shahed Nooshmand.
Diffstat (limited to 'challenge-077/shahed-nooshmand')
| -rw-r--r-- | challenge-077/shahed-nooshmand/blog.txt | 1 | ||||
| -rw-r--r-- | challenge-077/shahed-nooshmand/raku/ch-1.raku | 1 | ||||
| -rw-r--r-- | challenge-077/shahed-nooshmand/raku/ch-2.raku | 13 |
3 files changed, 15 insertions, 0 deletions
diff --git a/challenge-077/shahed-nooshmand/blog.txt b/challenge-077/shahed-nooshmand/blog.txt new file mode 100644 index 0000000000..a9f35a075b --- /dev/null +++ b/challenge-077/shahed-nooshmand/blog.txt @@ -0,0 +1 @@ +https://rafraichisso.ir/2020/09/10/pwc-77 diff --git a/challenge-077/shahed-nooshmand/raku/ch-1.raku b/challenge-077/shahed-nooshmand/raku/ch-1.raku new file mode 100644 index 0000000000..74e41fddfd --- /dev/null +++ b/challenge-077/shahed-nooshmand/raku/ch-1.raku @@ -0,0 +1 @@ +raku -e 'say "@*ARGS[0] = {.join(" + ")}" for (1, 2, * + * ...^ * > diff --git a/challenge-077/shahed-nooshmand/raku/ch-2.raku b/challenge-077/shahed-nooshmand/raku/ch-2.raku new file mode 100644 index 0000000000..a4f83af110 --- /dev/null +++ b/challenge-077/shahed-nooshmand/raku/ch-2.raku @@ -0,0 +1,13 @@ +#!/usr/bin/env raku + +my @matrix = + <O O X O>, + <X O O O>, + <X O O X>, + <O X O O>; + +.say for (^@matrix X ^@matrix[0]).grep: -> ($i, $j) { + @matrix[$i; $j] eq 'X' and not (<1 0 -1> X <1 0 -1>).grep: -> ($x, $y) { + $x | $y and do $_ eq 'X' with @matrix[$i + $x; $j + $y] + } +} |
