The following is a manual process
case class A(x: Int) { def f(y: Int) = x * y }
val af: (A => Int => Int) = _.f
val a = A(4)
val r = af(a)(2)
Is there a conventient way to get a function like af? Something like A magic f, possibly without using reflection. Ability to import all public methods of a class via import A#magic._ is a bonus.
This way is 10 symbols shorter: