title: Go function declaration syntax
body: <p>I have just started to learn <a href="http://golang.org" rel="nofollow"><code>Go</code></a> language and still trying to digest few things.</p>
  
  <p>I wrote a function <code>add</code> as:</p>
  
  <pre><code>func add(a int, b int) int {
    return a + b
  }
  // works fine
  
  func add(a, b) int {
    return a + b
  }
  // ./hello.go:7: undefined: a
  // ./hello.go:7: undefined: b
  // Digested: May be I need to give type
  
  func add(a, b int) int {
    return a + b
  }
  // works fine interestingly 
  
  func add(a int, b) int {
    return a + b
  }
  // ./hello.go:7: final function parameter must have type
  </code></pre>
  
  <p>I am really confused or due to lack of knowledge unable to understand the use case of </p>
  
  <p><code>final function parameter must have type</code>.</p>