From 4facb6507ab526fe7cb4f2eed0e3584fc97297e7 Mon Sep 17 00:00:00 2001 From: Nazanin S Date: Tue, 10 Aug 2021 12:27:54 +0430 Subject: [PATCH] Replace deprecated *sumBy* with *sumOf* in 'Solution' section inside 'aggregate function' --- Introduction to Coroutines and Channels/02_BlockingRequest.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Introduction to Coroutines and Channels/02_BlockingRequest.md b/Introduction to Coroutines and Channels/02_BlockingRequest.md index 37fa8ce..b7da4b4 100644 --- a/Introduction to Coroutines and Channels/02_BlockingRequest.md +++ b/Introduction to Coroutines and Channels/02_BlockingRequest.md @@ -134,7 +134,7 @@ A possible solution: ```kotlin fun List.aggregate(): List = groupBy { it.login } - .map { (login, group) -> User(login, group.sumBy { it.contributions }) } + .map { (login, group) -> User(login, group.sumOf { it.contributions }) } .sortedByDescending { it.contributions } ```