RosettaCodeData/Task/Stack/Elisa/stack-3.elisa
2023-07-01 13:44:08 -04:00

15 lines
284 B
Text

use GenericStack (StackofBooks, Book);
type Book = text;
BookStack = StackofBooks(50);
Push (BookStack, "Peter Pan");
Push (BookStack, "Alice in Wonderland");
Pull (BookStack)?
"Alice in Wonderland"
Pull (BookStack)?
"Peter Pan"
Pull (BookStack)?
***** Exception: Stack Underflow