1
1
Fork 0

Used sumOf instead of deprecated sumBy

This commit is contained in:
Svetlana Isakova 2021-09-02 14:52:03 +02:00
parent ac2275b7ae
commit ac031b0001
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ fun main() {
Product("bread", 2.0),
Product("wine", 5.0)
)
products.sumByDouble { it.price } eq 7.0
products.sumOf { it.price } eq 7.0
products.sortedByDescending { it.price } eq
"[Product(description=wine, price=5.0)," +