Largest int from concatenated ints: Difference between revisions
Content deleted Content added
Add NetRexx implementation |
→{{header|Perl 6}}: prefer string comparison, which won't fail on leading zeros, if there were any, which there aren't |
||
Line 539: | Line 539: | ||
=={{header|Perl 6}}== |
=={{header|Perl 6}}== |
||
<lang perl6>sub maxnum(@x) { |
<lang perl6>sub maxnum(@x) { |
||
[~] @x.sort: -> $a, $b { $b ~ $a |
[~] @x.sort: -> $a, $b { $b ~ $a leg $a ~ $b } |
||
} |
} |
||