code: public static <T> T pop(List<T> self) {
          if (self.isEmpty()) {
              throw new NoSuchElementException("Cannot pop() an empty List");
          }
          return self.remove(0);
      }
docs: Removes the initial item from the List.
  
  <pre class="groovyTestCase">
  def list = ["a", false, 2]
  assert list.pop() == 'a'
  assert list == [false, 2]
  </pre>
  
  This is similar to pop on a Stack where the first item in the list
  represents the top of the stack.
  
  Note: The behavior of this method changed in Groovy 2.5 to align with Java.
  If you need the old behavior use 'removeLast'.
  
  @param self a List
  @return the item removed from the List
  @throws NoSuchElementException if the list is empty
  @since 1.0