// Contain tests if this item in the stack.
Contain tests if this item in the stack.
// Contain tests if this item in the stack .
func (s *Stack) Contain(val interface{}) bool {
	s.sem <- 1
	e := s.list.Front()
	for e != nil {
		if e.Value == val {
			<-s.sem
			return true
		}
		e = e.Next()
	}
	<-s.sem
	return false
}
func ( s * Stack ) Contain ( val interface { } ) bool { s . sem <- 1 e := s . list . Front ( ) for e != nil { if e . Value == val { <- s . sem return true } e = e . Next ( ) } <- s . sem return false }
Contain tests if this item in the stack.
Contain tests if this item in the stack .