pop method
Removes and returns the front element from the queue. Throws a StateError if the queue is empty.
Implementation
T pop() {
if (empty) {
throw StateError('Cannot pop from an empty Queue');
}
return _container.deleteFront();
}
Removes and returns the front element from the queue. Throws a StateError if the queue is empty.
T pop() {
if (empty) {
throw StateError('Cannot pop from an empty Queue');
}
return _container.deleteFront();
}