title: Get the first element of a list idiomatically in Groovy
body: <p>Let the code speak first</p>
  
  <pre><code>def bars = foo.listBars()
  def firstBar = bars ? bars.first() : null
  def firstBarBetter = foo.listBars()?.getAt(0)
  </code></pre>
  
  <p>Is there a more elegant or idiomatic way to get the first element of a list, or null if it's not possible?  (I wouldn't consider a try-catch block elegant here.)</p>