Narcissistic decimal number: Difference between revisions

→‎{{header|Perl 6}}: oops, misunderstood the task description
mNo edit summary
(→‎{{header|Perl 6}}: oops, misunderstood the task description)
Line 8:
=={{header|Perl 6}}==
Here is a straightforward, naive implementation. Should work but takes ages.
<lang perl6>sub is-narcissic(Int $n) { $n == ([+] $n.comb) »**» $n.chars }
 
say (grep &is-narcissic, 0 .. *)[^25];</lang>
1,934

edits