Anonymous user
AKS test for primes: Difference between revisions
→{{header|Perl 6}}: use concat reduction instead of null join
(→{{header|Ruby}}: Output?) |
(→{{header|Perl 6}}: use concat reduction instead of null join) |
||
Line 382:
expansions[$d].kv.map: -> $i, $n {
my $p = $d - $i;
take < + - >[$n < 0] ~ ' ' unless $p == $d;
take $n.abs unless $p == $d > 0;
|