Anti-primes: Difference between revisions
m
→{{header|Perl 6}}: even more atomic
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: use atomic ops to try to avoid concurrency issues.) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: even more atomic) |
||
Line 733:
my @anti-primes = lazy 1, |(|(2..59), 60, *+60 … *).hyper.grep: -> $c {
my \mx = +propdiv($c);
next if mx <= atomic-fetch($last);
atomic-assign
$c
}
|