https://kotlinlang.org logo
o

orangy

03/24/2016, 6:21 PM
@cedric: well, no. It’s
in
not because it is in parameter, but because it is in parameter and return value of functional type. E.g.
Copy code
interface Test<out T> {
    fun test1() : () -> T  // ok, we return the lambda that will provide the value for T, so it’s `out`
    fun test2() : (T) -> Unit  // nope, we return the lambda and we will receive the value for T, so it’s `in`
}