diff options
Diffstat (limited to 'challenge-077')
| -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] + } +} |
