RosettaCodeData/Task/Find-the-missing-permutation/Perl-6/find-the-missing-permutation-1.pl6

7 lines
233 B
Raku
Raw Permalink Normal View History

2013-10-27 22:24:23 +00:00
my @givens = <ABCD CABD ACDB DACB BCDA ACBD ADCB CDAB DABC BCAD CADB CDBA
CBAD ABDC ADBC BDCA DCBA BACD BADC BDAC CBDA DBCA DCAB>;
2013-04-10 22:43:41 -07:00
2015-11-18 06:14:39 +00:00
my @perms = <A B C D>.permutations.map: *.join;
2013-10-27 22:24:23 +00:00
.say when none(@givens) for @perms;