title: Elixir - What is syntax for function definitions?
body: <p>Using Elixir V1.1.1 on OS X I am having problems getting my head around the Elixir function definition syntax.</p>
  
  <p>Given a function definition:</p>
  
  <pre><code>def foobar(arg1, arg2), do: &lt;&lt;something&gt;&gt; end
  </code></pre>
  
  <p>It seems that in some cases the comma  after the parenthesis is required, other times it is not. Likewise the colon after the 'do' and likewise the closing 'end'. I am sure I am vastly over-complicating the situation, but this seems like a weird setup for a programming language.</p>
  
  <p>Under what circumstances are these elements required/optional?</p>