Q:

How can I obtain Function objects from methods in Scala?

Suppose I have a simple class in Scala:
class Simple {
  def doit(a: String): Int = 42
}

How can I store in a val the Function2[Simple, String, Int] that takes two arguments (the target Simple object, the String argument), and can call doit() get me the result back?

A:

val f: Function2[Simple, String, Int] = _.doit(_)

A:

same as sepp2k, just using another syntax
val f = (s:Simple, str:String) => s.doit(str)

A:

For those among you that don't enjoy typing types:
scala> val f = (_: Simple).doit _
f: (Simple) => (String) => Int = <function1>

Following a method by _ works for for any arity:
scala> trait Complex {                        
     |    def doit(a: String, b: Int): Boolean
     | }                                      
defined trait Complex

scala> val f = (_: Complex).doit _            
f: (Complex) => (String, Int) => Boolean = <function1>

This is covered by a combination of §6.23 "Placeholder Syntax for Anonymous Functions" and §7.1 "Method Values" of the Scala Reference

