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