peekAll

fun peekAll(numToPeek: Int = data.size): List<T>

Returns all elements in this Stack, with the last pushed Element at the highest index.

Return

All elements in this Stack as List.

Throws

If numToPeek is negative or greater than the Stack's size.