Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (9 sloc) 326 Bytes
package ii_collections
fun example5() {
val result = listOf("a", "bbb", "cc").sortedBy { it.length }
result == listOf("a", "cc", "bbb")
}
fun Shop.getCustomersSortedByNumberOfOrders(): List<Customer> {
// Return a list of customers, sorted by the ascending number of orders they made
todoCollectionTask()
}