title: Does Swift implement tail call optimization? and in mutual recursion case?
body: <p>In particular if I have the following code:</p>
  
  <pre><code>func sum(n: Int, acc: Int) -&gt; Int {
    if n == 0 { return acc }
    else { return sum(n - 1, acc + n) }
  }
  </code></pre>
  
  <p>Will Swift compiler optimize it to a loop? And does it so in a more interesting case below?</p>
  
  <pre><code>func isOdd(n: Int) -&gt; Bool {
    if n == 0 { return false; }
    else { return isEven(n - 1) }
  }
  
  func isEven(n: Int) -&gt; Bool {
    if n == 0 { return true }
    else { return isOdd(n - 1) }
  }
  </code></pre>