https://kotlinlang.org logo
#getting-started
Title
# getting-started
b

benleggiero

02/12/2017, 1:18 AM
Why won't this compile?
Copy code
fun <A, B, Output> processTwoArgsWithArbitraryFunction(a: A, b: B, function: (A, B) -> Output): Output {
    return function(a, b)
}

fun Double.lessThanOrEqual(a: Double, b: Double): Boolean {
    return a <= b
}

val is5LessThan6 = processTwoArgsWithArbitraryFunction(5.0, 6.0, function = Double::lessThanOrEqual)