contains method

bool contains(
  1. T x
)

returns true if element is found in the stack

Implementation

bool contains(T x) {
  return _list.contains(x);
}