Smarandache prime-digital sequence: Difference between revisions

m
→‎{{header|Raku}}: note use of 'ntheory' module
(Added XPL0 example.)
m (→‎{{header|Raku}}: note use of 'ntheory' module)
Line 1,725:
=={{header|Raku}}==
(formerly Perl 6)
{{libheader|ntheory}}
 
<lang perl6>use Lingua::EN::Numbers;
use ntheory:from<Perl5> <:all>;
Line 1,731:
# Implemented as a lazy, extendable list
my $spds = grep { .&is_prime }, flat [2,3,5,7], [23,27,33,37,53,57,73,77], -> $p
{ state $o++; my $oom = 10**(1+$o); [ flat (2,3,5,7).map: -> $l { (|$p).map: $l*$oom + * } ] } … *;
 
say 'Smarandache prime-digitals:';
2,392

edits