Narcissistic decimal number: Difference between revisions

Content added Content deleted
Line 8: Line 8:
=={{header|Perl 6}}==
=={{header|Perl 6}}==
{{output?}}
{{output?}}
Here is a straightforward, naive implementation. Should work but takes ages.
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 }