aarjav
01/28/2019, 12:09 AMFunction<T,R>?
to ((T) -> R)?
I used an extension property val Function<T,R>.lambda: ((T) -> R) get() = this::apply
and use it like func?.lambda
voddan
01/28/2019, 2:50 PMFunction<T,R>?
to ((T) -> R)?
are the same type, you shouldn't need converting one to the otheraarjav
01/28/2019, 5:22 PMfun <T,R> bar(func: ((T) -> R)? = null) {
foo<T,R>(func)
}
fun <T,R> foo(func: java.util.function.Function<T, R>? = null) {
bar<T,R>(func)
}
karelpeeters
01/29/2019, 9:50 AMbar<T,R>{ func.apply(it) }
?