Scala Iterator min() method with example
The min() method belongs to the concrete value members of the class AbstractIterator. It is defined in the classes IterableOnceOps. It is utilized to find the smallest element.
Method Definition : def min[B >: A](implicit ord: math.Ordering[B]): A
Where, B is the type over which the ordering is defined and ord is an ordering to be used for comparing elements.
Return Type : It returns the smallest element of the collection stated with respect to the ordering ord.
Here, the smallest element of the stated collection is returned.