How to tell the compiler to use Kotlin extension function instead of Java 8 function for Android App

186 Views Asked by At

I want to use function MutableList<T>.replaceAll(transformation: (T) -> T) in my Android project.

There is a very similar question: Kotlin Extension Functions suddenly require api level 24

But is my case, I want to use the function replaceAll which has identical syntax with Java 8 implementation. So, the question is: how to tell the compiler that I want to use the extension function from Kotlin standard library instead of Java 8 function.

0

There are 0 best solutions below