diff options
author | Andinus <andinus@nand.sh> | 2021-08-11 15:26:15 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-08-11 15:26:15 +0530 |
commit | 321825828ac918bad28d0597a8616c6dc9802c3c (patch) | |
tree | 0b8e9cb1012197750eb58e972736319b2a6abac2 /raku/anagram/Anagram.rakumod | |
parent | 2979ef790ac5b8f58495e0dd08cafd6a3a2e30a5 (diff) | |
download | exercism-321825828ac918bad28d0597a8616c6dc9802c3c.tar.gz |
Add solved exercises
Diffstat (limited to 'raku/anagram/Anagram.rakumod')
-rw-r--r-- | raku/anagram/Anagram.rakumod | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/raku/anagram/Anagram.rakumod b/raku/anagram/Anagram.rakumod new file mode 100644 index 0000000..5f67e65 --- /dev/null +++ b/raku/anagram/Anagram.rakumod @@ -0,0 +1,8 @@ +unit module Anagram; + +sub match-anagrams (Str :$subject!, :@candidates!) is export { + gather for @candidates { + next if .fc eq $subject.fc; + take $_ if .fc.comb.Bag eqv $subject.fc.comb.Bag; + } +} |