title: How can I obtain Function objects from methods in Scala?
body: <p>Suppose I have a simple class in Scala:</p>
  
  <pre><code>class Simple {
    def doit(a: String): Int = 42
  }
  </code></pre>
  
  <p>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?</p>