title: Remove item from groovy list
body: <p>I am trying to remove an item from groovy list. I've tried following:</p>
  
  <pre><code>    List&lt;User&gt;  availableUsers = []
  
      availableUsers = workers
  
      for (int i = 0; i &lt; availableUsers.size(); i++) {
          if (availableUsers[i].equals(user)){
              availableUsers.drop(i)
              break
          }
      }
  </code></pre>
  
  <p>I've also tried:</p>
  
  <pre><code>availableUsers.remove(user)
  </code></pre>
  
  <p>In both cases the list gets emptied. Does anyone have any idea what's going on? </p>