Truncatable primes: Difference between revisions
Content deleted Content added
Line 250: | Line 250: | ||
} |
} |
||
sub trunc_prime ($type, $limit) { |
sub trunc_prime ($type, $limit is copy) { |
||
$limit += ($limit % 2 ?? 0 !! 1); |
|||
for ($ |
for ($limit, * - 2 ... * < 2 ) -> $loop { |
||
next if $loop ~~ /0/; # No zeros allowed |
next if $loop ~~ /0/; # No zeros allowed |
||
my $this = $loop; |
my $this = $loop; |