Permalink
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() |
|
} |
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.