Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (10 sloc) 342 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 for several times.
todoCollectionTask()
}