State name puzzle: Difference between revisions
m
→{{header|Perl 6}}: clarify output
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Fix syntax errors, update) |
SqrtNegInf (talk | contribs) m (→{{header|Perl 6}}: clarify output) |
||
Line 1,427:
say "\n54 states:";
.say for sort anastates @states, < New_Kory Wen_Kory York_New Kory_New New_Kory >;
sub anastates (*@states) {
Line 1,444:
for $i ^..^ @c -> $j {
my $set = set @c[$i].list, @c[$j].list;
take @c[$
}
}
Line 1,452:
Output:
<pre>50 states:
North Carolina,
54 states:
New Kory, Kory New
New Kory
New Kory, York New
New
New
New York,
New
New
New York,
New
New York
New
New
New
North Carolina, South Dakota
=={{header|Phix}}==
|