title: Kotlin fold error "None of the following functions can be called with the arguments supplied"
body: <p>I get an error for this fold function;</p>
  
  <pre><code>fun &lt;T&gt; addAll(num: List&lt;T&gt;) : T = num.fold(0, {x,y -&gt; x+y})
  </code></pre>
  
  <p>saying:</p>
  
  <p><strong>None of the following functions can be called with the arguments supplied.</strong></p>
  
  <p>However if I do:</p>
  
  <pre><code> fun addAll(num: List&lt;Int&gt;) : Int = num.fold(0, {x,y -&gt; x+y})
  </code></pre>
  
  <p>It works without problems.
  Is it possible to keep the function generic in order to use it for lists of both integers and doubles?</p>