Scala Stack diff() method with example
In Scala Stack class, the diff() method is used to find the difference between the two stacks. It deletes elements that are present in one stack from the other one. Method Definition: def diff[B >: A](that: collection.Seq[B]): Stack[A] Return Type: It returns a new stack which consists of element