Jump to content

Pernicious numbers: Difference between revisions

m
Fix Perl 6 -> Raku in comments
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
m (Fix Perl 6 -> Raku in comments)
Line 2,120:
=={{header|Raku}}==
(formerly Perl 6)
 
Straightforward implementation using Perl 6Raku's ''is-prime'' built-in subroutine.
<lang perl6>sub is-pernicious(Int $n --> Bool) {
is-prime [+] $n.base(2).comb;
10,333

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.