In addition to adding elements to the end of the sequence, the stack LSTM provides a pop operation which moves the stack pointer to the previous element.
the LSTM can be understood as a stack implemented so that contents are never overwritten, When the action OUT is taken, the stack is cleared by moving the stack pointer to the initial position.