2 ms·
It has invented Scala! function sortByName(persons: List[Person]): List[Person] { return persons.sortBy(p => p.name) } Scala uses `def` rather
by tasuki 4y ago
It has invented Scala!
function sortByName(persons: List[Person]): List[Person] {
return persons.sortBy(p => p.name)
}
Scala uses `def` rather than `function`, but other that that I think this should be valid?