How do I get the function value f
of an instance method?
class X(i : Int){
def method(y : Int) = y + i
}
val x = new X(10)
val f : (Int) => Int = ?
val r = x.method(2)
val r2 = f(2)
Calling x.method(2)
and f(2)
would be the same method call.