No Description

stack.go 218B

1234567891011121314
  1. package main
  2. // STACK OMIT
  3. type Stack []interface{}
  4. func (s *Stack) Push(v interface{}) { *s = append(*s, v) }
  5. func (s *Stack) Pop() interface{} {
  6. v := *s[len(*s)-1]
  7. *s = *s[:len(*s)-1]
  8. return v
  9. }
  10. // STACK OMIT