For instance collection requires BiFunction, could...
# getting-started
g
For instance collection requires BiFunction, could I pass Kotlins lambda?
e
gbm: Yes, it does.
g
Sorry but cannot understand why this error occurs
e
What kind of error? Can you share it?
g
It seems like it is not possible to send img into Thread
e
It should be just
result.merge(tag, 1, { a, b -> a + b })
. Commas around parameters mean different thing (destructuring)
g
Oh! Thank you, didn’t know that:) Really new to Kotlin. It is also working with anonymous function. I guess anonymous functions types could also be inferred in Kotlin?
e
This page will help you with all these details: https://kotlinlang.org/docs/reference/lambdas.html