You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After calling ++ on empty ConcatIterator it still returns false on hasNext
vari:Iterator[Int] =Iterator.empty
defpoll() = {
while (i.hasNext) {
println(i.next())
}
println("No more elements")
}
poll()
println("here we have join iterator")
i = i ++Seq(1, 2, 3)
poll()
println("here we have concat iterator")
i = i ++Seq(4, 5, 6)
poll()
println("append to empty concate iterator")
i = i ++Seq(7, 8, 9)
poll()
println(i.hasNext)
The text was updated successfully, but these errors were encountered:
After calling ++ on empty ConcatIterator it still returns false on hasNext
The text was updated successfully, but these errors were encountered: