code: public static <T> Collection<T> dropRight(Iterable<T> self, int num) {
          Collection<T> selfCol = self instanceof Collection ? (Collection<T>) self : toList(self);
          if (selfCol.size() <= num) {
              return createSimilarCollection(selfCol, 0);
          }
          if (num <= 0) {
              Collection<T> ret = createSimilarCollection(selfCol, selfCol.size());
              ret.addAll(selfCol);
              return ret;
          }
          Collection<T> ret = createSimilarCollection(selfCol, selfCol.size() - num);
          ret.addAll(asList((Iterable<T>)selfCol).subList(0, selfCol.size() - num));
          return ret;
      }
docs: Drops the given number of elements from the tail of this Iterable.
  <pre class="groovyTestCase">
  def strings = [ 'a', 'b', 'c' ]
  assert strings.dropRight( 0 ) == [ 'a', 'b', 'c' ]
  assert strings.dropRight( 2 ) == [ 'a' ]
  assert strings.dropRight( 5 ) == []
  
  class AbcIterable implements Iterable<String> {
  Iterator<String> iterator() { "abc".iterator() }
  }
  def abc = new AbcIterable()
  assert abc.dropRight(0) == ['a', 'b', 'c']
  assert abc.dropRight(1) == ['a', 'b']
  assert abc.dropRight(3) == []
  assert abc.dropRight(5) == []
  </pre>
  
  @param self the original Iterable
  @param num  the number of elements to drop from this Iterable
  @return a Collection consisting of all the elements of this Iterable minus the last <code>num</code> elements,
  or an empty list if it has less then <code>num</code> elements.
  @since 2.4.0