E last

Source

E get last {
  Iterator<E> it = iterator;
  if (!it.moveNext()) {
    throw IterableElementError.noElement();
  }
  E result;
  do {
    result = it.current;
  } while(it.moveNext());
  return result;
}