title: What is the difference between Groovy each and forEach?
body: <p>Simple question that I haven't been able to find a simple answer for on the googles:  what is the difference between Groovy's each and forEach loops?</p>
  
  <p>I made a simple example and the syntax and behavior seem identical:</p>
  
  <pre><code>    [1, 2].each { println it }
      [1, 2].forEach { println it }
  </code></pre>
  
  <p>Both print:</p>
  
  <pre><code>1
  2
  </code></pre>
  
  <p>The only example I see of both in the Groovy Language Documentation seems to touch on the difference between lambdas and closures, but I can't relate that to the examples I've tried.</p>
  
  <p>Thank you</p>