Scala Iterator toSeq() method with example
The toSeq() method belongs to the concrete value member of the class Abstract Iterator. It is equivalent to the Seq method but this method is more faster.
Method Definition: val result = iter.toSeq
Return Type: It returns the stated collection as a sequence.
So, here a sequence is obtained.
So, here an empty iterator is obtained as the stated iterator is empty.
My Personal Notes arrow_drop_up
Please Login to comment...