title: How do you invoke a Function1[_, String] in Scala?
body: <p>I answered a question about a map of functions in <a href="https://stackoverflow.com/questions/4617660/defining-a-map-from-string-to-function-in-scala">Defining a Map from String to Function in Scala</a> which led to a <code>Function1[_, String]</code> which I believe is correct as far as the typing question but possibly useless because I don't know how to invoke such a function:</p>
  
  <pre><code>scala&gt; def f(x: Int) = x.toString
  f: (x: Int)java.lang.String
  
  scala&gt; f(8)
  res0: java.lang.String = 8
  
  scala&gt; val g: Function1[_, String] = f _
  g: Function1[_, String] = &lt;function1&gt;
  
  scala&gt; g(8)
  &lt;console&gt;:8: error: type mismatch;
   found   : Int(8)
   required: _$1 where type _$1
         g(8)
           ^
  
  scala&gt; val h: Function1[Int, String] = g
  &lt;console&gt;:7: error: type mismatch;
   found   : (_$1) =&gt; String where type _$1
   required: (Int) =&gt; String
         val h: Function1[Int, String] = g
  </code></pre>
  
  <p>Is there any way to use <code>g</code>?</p>