title: Scala pass function as parameter to another function
body: <p>Sorry about this mess. I'm still getting my way in scala. Rephrasing the all question is this:</p>
  
  <pre><code>def func1(x: Double, y: Double) = {
    x+y
  }
  
  def func2(x: Double, y: Double) = {
    x-y
  }
  
  def calc(f: (Double, Double) =&gt; Double, z: Int) = {
    f(1,2) + z
  }
  
  //Sometimes I want to call
  calc(func1(1,2), 3)
  
  //Other times
  calc(func2(1,2), 3)
  </code></pre>
  
  <p>and I get this error:</p>
  
  <pre><code>&lt;console&gt;:52: error: type mismatch;
   found   : Double
   required: (Double, Double) =&gt; Double
                calc(func1(1,2), 3)
                          ^
  </code></pre>
  
  <p>what is the proper way to call calc()?</p>
  
  <p>thanks</p>