Narcissistic decimal number: Difference between revisions
Content added Content deleted
(→{{header|Perl 6}}: Output?) |
|||
Line 8: | Line 8: | ||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |
||
{{output?}} |
{{output?}} |
||
Here is a straightforward, naive implementation. |
Here is a straightforward, naive implementation. It works but takes ages. |
||
<lang perl6>sub is-narcissic(Int $n) { $n == [+] $n.comb »**» $n.chars } |
<lang perl6>sub is-narcissic(Int $n) { $n == [+] $n.comb »**» $n.chars } |
||