apatrida
09/14/2016, 1:32 PMfun evaluate(first: Int, second: Int, op: (Int, Int) -> Int): Int {
return op(first, second))
}
can be called with:
evaluate(2, 3) { a, b -> a * b }
evaluate(2, 3, Int::times)
Technically Int::times has the receiver as the first parameter but I thought the compiler would block it due to the declared signature not being that. So this is intentionally allowed, or a hole?