locke
01/13/2019, 6:08 AMlocke
01/13/2019, 6:09 AMShawn
01/13/2019, 6:09 AMval listener: (View) -> Unit = ::setOnClickListener
locke
01/13/2019, 6:10 AMval listener: (((View) -> Unit) -> Unit) = this::setOnClickListener
Shawn
01/13/2019, 6:10 AMTobias G. Waaler
10/05/2020, 10:31 AMJavier
10/05/2020, 3:45 PMuser
10/05/2020, 3:46 PMJason5lee
10/06/2020, 7:06 AMuser
10/06/2020, 8:43 AMblackstardlb
10/06/2020, 12:48 PMNir
10/06/2020, 3:45 PMinline fun <T, K, R> Grouping<T, K>.aggregate(
operation: (key: K, accumulator: R?, element: T, first: Boolean) -> R
): Map<K, R>
Looking at aggregate, I can understand why, if R
is already a nullable type, you need first
. However, if R is not a nullable type (which is probably the more common case), then it seems like you don't need first
at all; if accumulator is null then you're on the first element, otherwise you're not. Why is there not an overload for aggregate
that takes a 3 parameter lambda?Nir
10/06/2020, 3:45 PMuser
10/06/2020, 4:12 PMKarlo Lozovina
10/06/2020, 7:28 PMstandinga
10/07/2020, 1:33 AMsuspend fun answer() = withContext(coroutineDispatcher) {
x.foo()
}
suspend fun onOfferReceived(it: SignalingServerMessage.SessionDescription) = withContext(coroutineDispatcher) {
val content = it.content
bar()
answer()
}
suspend fun bar(): Unit = x.withLock {
// do something, wait for callback
}
standinga
10/07/2020, 1:34 AMstandinga
10/07/2020, 1:34 AMstandinga
10/07/2020, 1:35 AMRodrigo Silva
10/07/2020, 2:44 AMuser
10/07/2020, 10:51 AMuser
10/07/2020, 3:30 PMDaniel Svensson
10/07/2020, 7:13 PMsmallufo
10/07/2020, 7:20 PMsahil Lone
10/08/2020, 6:19 AMsahil Lone
10/08/2020, 6:19 AMkenkyee
10/08/2020, 10:39 AMAbduqodiri Qurbonzoda [JB]
10/08/2020, 12:38 PMIrena Radyu
10/08/2020, 1:12 PMThis year the leading Europe's hackathon Junction and Just AI are challenging Kotlin devs worldwide to Make Conversational AI Work.
Create a fancy conversational AI solution using the first open-source Kotlin-based framework and compete for a cash prize of €10,000!https://just-ai.com/junction-challenge/
user
10/08/2020, 3:46 PM