Make an empty stack. Delete the top element from the stack. Return the item on the top of the stack without deleting it. Insert an item at the top of the stack. Return a boolean value indicating whether the stack is empty or not.
Questions Add a variable named pushed that keeps track of the number of things on the stack.
Add a method named pushed that returns the value in the variable pushed . Do not use the Scheme length function to caculate the answer. You may have to think a bit to figure out how to give the variable and the method the same name. Mutable List Structures. Previously we used cons to make pairs.