package stackimport "container/list"type Stack struct {list *list.List}func NewStack() *Stack {return &Stack{list: list.New(),}}func (s *Stack) Push(v interface{}) {s.list.PushBack(v)}func (s *Stack) Pop() interface{} {if e := s.list.Back(); e != nil {return e.Value}return nil}func (s *Stack) Len() int {return s.list.Len()}func (s *Stack) IsEmpty() bool {return s.Len() == 0}
