Push a new element onto the stack
(value interface{})
| 26 | |
| 27 | // Push a new element onto the stack |
| 28 | func (s *B2GrowableStack) Push(value interface{}) { |
| 29 | s.top = &StackElement{value, s.top} |
| 30 | s.size++ |
| 31 | } |
| 32 | |
| 33 | // Remove the top element from the stack and return it's value |
| 34 | // If the stack is empty, return nil |