Anti-primes: Difference between revisions
Content deleted Content added
Thundergnat (talk | contribs) m →{{header|Perl 6}}: Concurrency not really necessary, and causing races under load. |
|||
Line 875: | Line 875: | ||
} |
} |
||
my |
my $last = 0; |
||
my @anti-primes = lazy 1, |(|(2..59), 60, *+60 … *) |
my @anti-primes = lazy 1, |(|(2..59), 60, *+60 … *).grep: -> $c { |
||
my \mx = +propdiv($c); |
my \mx = +propdiv($c); |
||
next if mx <= |
next if mx <= $last; |
||
$last = mx; |
|||
$c |
$c |
||
} |
} |