Anonymous user
Largest int from concatenated ints: Difference between revisions
m
→{{header|Ceylon}}
(→{{header|Kotlin}}: Update Kotlin) |
|||
Line 276:
=={{header|Ceylon}}==
{{trans|Kotlin}}
{{works with|Ceylon|1.2.1}}
<lang ceylon>shared void
function intConcatenationComparer(Integer x, Integer y) {
return yx <=> xy;
}
function biggestConcatenation(Integer* ints) => "".join(ints.sort(intConcatenationComparer));
value test1 = {1, 34, 3, 98, 9, 76, 45, 4};
value test2 = {54, 546, 548, 60};
|