Hello, I have a java function with following signature:
public static ScoreDto score(String email, String name, String surname, Function<String, Boolean> function)
What would be the idiomatic/more readable approach to call it from Kotlin, given that
dataProvider
is a nullable instance of class that implements Function<String, Boolean>?
score(
"<mailto:some_email@domain.com|some_email@domain.com>",
"John",
"Doe"
) { dataProvider?.apply(it) }
vs
score(
"<mailto:some_email@domain.com|some_email@domain.com>",
"John",
"Doe",
{ dataProvider?.apply(it) }
)
vs
dataProvider?.let {
score(
"<mailto:some_email@domain.com|some_email@domain.com>"
"John",
"Doe",
it
)
}