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