peek method
T
peek()
Implementation
T peek() {
if (this.isEmpty) {
throw StateError('Cannot peek() on empty stack.');
}
return this._underlyingQueue.last;
}
T peek() {
if (this.isEmpty) {
throw StateError('Cannot peek() on empty stack.');
}
return this._underlyingQueue.last;
}