RosettaCodeData/Task/Stack/Elisa/stack-3.elisa

16 lines
284 B
Plaintext

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