title: Assigning function to a variable in swift strange behavior
body: <p>I have the following simple segment of code:</p>
  
  <pre><code>func swapper(var arr: [Int]) {
      let first: Int = arr[0]
      let last: Int  = arr[arr.count - 1]
      arr[0] = last
      arr[arr.count - 1] = first
      arr
  }
  var myFunctionPointer : ([Int]) -&gt; () = swapper
  </code></pre>
  
  <p>It is working well but when i try to add  <strong>inout</strong>  to the signature of the method's argument I was unable to assign it to variable outside like following.</p>
  
  <pre><code>func swapper(inout  arr: [Int]){
      let first: Int = arr[0]
      let last: Int  = arr[arr.count - 1]
      arr[0] = last
      arr[arr.count - 1] = first
      arr
  }
  var myFunctionPointer: ([Int]) -&gt; () = swapper // This failed [int] is not subtype of inout [Int]
  var myFunctionPointer: (inout[Int]) -&gt; () = swapper // I am not getting a compilation error, but the playground keeps showing an error message and everything stopped working 
  </code></pre>
  
  <p>I am using Xcode 6.1 Playground.</p>
  
  <p>Is the second way the right way but Xcode has a bug?
  any thoughts?</p>