Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
12 lines (10 sloc) 338 Bytes
package ii_collections
fun example6() {
listOf(1, 3).sum() == 4
listOf("a", "b", "cc").sumBy { it.length } == 4
}
fun Customer.getTotalOrderPrice(): Double {
// Return the sum of prices of all products that a customer has ordered.
// Note: a customer may order the same product several times.
todoCollectionTask()
}