title: Swift: How to declare function signature that takes mutable / var parameter?
body: <p>Simple question, so hopefully there is a simple answer.  How do you capture / define a function type that takes a var parameter?  </p>
  
  <pre><code>func foo(a:Int) -&gt; Int  {
      return a + 1
  }
  
  func bar(var a:Int) -&gt; Int  {
      return ++a
  }
  
  
  // define function type taking a constant parameter like foo above
  typealias Foo = (Int)-&gt;Int
  
  // try to a function type taking a var parameter like bar above
  typealias Bar = (var Int)-&gt;Int
      // gives a misleading compiler error about needing a leading semi colon
  </code></pre>
  
  <p>Does this seem like a compiler bug or am I missing something obvious?  I am using Xcode 6.1.1.</p>