title: Elegant way for do ... while in groovy
body: <p>How to do code something like this in <code>groovy</code>?</p>
  <pre><code>do {
  
    x.doIt()
  
  } while (!x.isFinished())
  </code></pre>
  <p>Because there is <em>no <code>do ... while</code> syntax</em> in groovy.</p>
  <blockquote>
  <p><strong>No 'do ... while()' syntax as yet.</strong></p>
  <p>Due to ambiguity, we've not yet added support for do .. while to Groovy</p>
  </blockquote>
  <p>References:</p>
  <ul>
  <li><a href="http://groovy.329449.n5.nabble.com/" rel="noreferrer">groovy - dev</a> &gt; <a href="http://groovy.329449.n5.nabble.com/do-while-td4981923.html" rel="noreferrer">do while</a></li>
  <li><a href="http://groovy.codehaus.org/Migration+From+Classic+to+JSR+syntax?print=1" rel="noreferrer">Migration From Classic to JSR syntax</a></li>
  <li><a href="http://groovy-lang.org/documentation.html" rel="noreferrer">Groovy Documentation</a> &gt; <a href="http://groovy-lang.org/semantics.html#_control_structures" rel="noreferrer">Control Structures</a> &gt;  <a href="http://groovy-lang.org/semantics.html#_looping_structures" rel="noreferrer">Looping</a></li>
  <li><a href="http://rosettacode.org/wiki/Rosetta_Code" rel="noreferrer">Rosetta Code</a> &gt; <a href="http://rosettacode.org/wiki/Loops/Do-while#Groovy" rel="noreferrer">Loops/Do-while Groovy</a></li>
  </ul>