title: what is the difference when using var vs typealias
body: <p>I am defining my function as the variable by using <code>typealias</code> and <code>var</code>( or <code>let</code>)</p>
  
  <pre><code>typealias IntFuction = (Int) -&gt; Int
  
  var IntFuction = (Int) -&gt; Int
  </code></pre>
  
  <p>If am using <code>typealias</code>, there are no error at all. However if I am trying to use either <code>var</code> or <code>let</code>, I am getting the error like below</p>
  
  <pre><code>consecutive statement on a line must be separated by ";"
  </code></pre>
  
  <p>With the <a href="http://fuckingclosuresyntax.com" rel="nofollow">closure</a>, it should be fine if you can use either <code>typealias</code> or <code>var</code> to define as a variable </p>
  
  <p>Can anybody explain what is happening when I am using <code>var</code> to define the function as the variable</p>