diff options
-rw-r--r-- | stack.go | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -19,9 +19,7 @@ func (s *Stack) Push(v Value) { // Insert inserts value at head func (s *Stack) Insert(v Value) { - *s = append(*s, 0) - copy((*s)[1:], (*s)[:len(*s)-1]) - (*s)[0] = v + *s = append(Stack{v}, *s...) } // Pop retrieves value from tail |