NipN removes the Nth object on the stack Stack transformation: NipN(0): [... x1 x2 x3] -> [... x1 x2] NipN(1): [... x1 x2 x3] -> [... x1 x3] NipN(2): [... x1 x2 x3] -> [... x2 x3]
(idx int32)
| 173 | // NipN(1): [... x1 x2 x3] -> [... x1 x3] |
| 174 | // NipN(2): [... x1 x2 x3] -> [... x2 x3] |
| 175 | func (s *stack) NipN(idx int32) error { |
| 176 | _, err := s.nipN(idx) |
| 177 | return err |
| 178 | } |
| 179 | |
| 180 | // Tuck copies the item at the top of the stack and inserts it before the 2nd |
| 181 | // to top item. |