title: Swift - Error calling a function from another function
body: <p>While following Apple's book <a href="https://itun.es/us/jEUH0.l" rel="nofollow">"The Swift Programming Language"</a></p>
  
  <p>I ran across an issue while working on the "EXPERIMENT - Write a function that calculates the average of its arguments." from the first chapter.  </p>
  
  <p>To determine the average of a set of numbers, I want to reuse my sum of numbers [setOf(numbers: Int...)] function and divide by the count of numbers [numbers.count].  I am receiving the Error:  </p>
  
  <pre><code>Could not find an overload for '__conversions' that accepts the supplied arguments  
  </code></pre>
  
  <p>when I try to call <code>sumOf(numbers)</code> from my <code>averageOf(numbers)</code> function.  </p>
  
  <p>What should I change to call my <code>sumOf(numbers)</code> function correctly, from my <code>averageOf(numbers)</code> function?  </p>
  
  <pre><code>func sumOf(numbers: Int...) -&gt; Int {
      var sum = 0 //0
      for number in numbers {
          sum += number
      }
      return sum  //651
  }
  sumOf(42, 597, 12)  //651
  
  func averageOf(numbers: Int...) -&gt; Int {
      var sum = sumOf(numbers) //Issue in this line
      return  sum / numbers.count
  }
  averageOf(42, 597, 12)
  </code></pre>
  
  <p><em>Paste the code above into a new Xcode 6 playground to recreate.</em></p>
  
  
  
  <p><a href="http://i.stack.imgur.com/S11zh.png" rel="nofollow">Error Screenshot</a> (I need 10 reputation points before I can post the image.)</p>