clear

fun clear(): List<T>

Pops all elements in this Stack and returns them in a List, with the topmost element as the list's head i.e. index 0.

Return

All elements in this Stack popped.