title: What is wrong with this F# curried function?
body: <p>I'm writing this curried f# function called <code>inner</code> that should take 2 lists as parameters and multiply both according to position and then return the sum:</p>
  
  <pre><code>let rec inner xs = 
      let aux ys = function
      | ([], ys) -&gt; 0
      | (xs, []) -&gt; 0
      | (x::xs, y::ys) -&gt; (x*y) + inner xs ys
      aux ys;;
  inner [1;2;3] [4;5;6];;
  </code></pre>
  
  <p>In this case the answer is 32 because 1*4 + 2*5 + 3*6 = 32. And it works but there's this message:</p>
  
  <blockquote>
    <p>error FS0001: Type mismatch. Expecting a<br>
        <code>'a list -&gt; 'd</code><br>
    but given a<br>
        <code>'b list * 'a list -&gt; int</code></p>
    
    <p>The type <code>'a list</code> does not match the type <code>'b list * 'a list</code></p>
  </blockquote>
  
  <p>I honestly don't know what to put next to <code>aux</code> when calling it to make it work.</p>