pop method

T? pop()

Removes the last element from the Vec and returns it, or None if it is empty.

Implementation

T? pop() {
  if (isEmpty) {
    return null;
  }
  return removeLast();
}