title: Can Scala allow free Type Parameters in arguments (are Scala Type Parameters first class citizens?)?
body: <p>I have some Scala code that does something nifty with two different versions of a type-parameterized function.  I have simplified this down a lot from my application but in the end my code full of calls of the form <code>w(f[Int],f[Double])</code> where <code>w()</code> is my magic method.  I would love to have a more magic method like <code>z(f) = w(f[Int],f[Double])</code> - but I can't get any syntax like <code>z(f[Z]:Z-&gt;Z)</code> to work as it looks (to me) like function arguments can not have their own type parameters.  Here is the problem as a Scala code snippet.  </p>
  
  <p>Any ideas?  A macro could do it, but I don't think those are part of Scala.</p>
  
  <pre><code>object TypeExample {
    def main(args: Array[String]):Unit = {
      def f[X](x:X):X = x              // parameterize fn
      def v(f:Int=&gt;Int):Unit = { }     // function that operates on an Int to Int function
      v(f)                             // applied, types correct
      v(f[Int])                        // appplied, types correct
      def w[Z](f:Z=&gt;Z,g:Double=&gt;Double):Unit = {} // function that operates on two functions
      w(f[Int],f[Double])              // works
  // want something like this:  def z[Z](f[Z]:Z=&gt;Z) = w(f[Int],f[Double])
  // a type parameterized function that takes a single type-parameterized function as an  
  // argument and then speicalizes the the argument-function to two different types,  
  // i.e. a single-argument version of w() (or wrapper)
    }
  }
  </code></pre>