Scala Queue distinct() method with example
The distinct() method is utilized to remove the duplicate elements from the given queue. Method Definition: def distinct: Queue[A] Return Type: It returns a new queue that contains only distinct elements. Example #1: // Scala program of distinct() // method // Import Queue import scala.collection.mu