(Changed in version 2.8.0) collect has changed. The previous behavior can be reproduced with toSeq.
(concatIterator: MonadOps[T]).filter(p)
(concatIterator: MonadOps[T]).flatMap(f)
(concatIterator: MonadOps[T]).map(f)
(concatIterator: MonadOps[T]).withFilter(p)
(Since version ) see corresponding Javadoc for more information.
Basically a fast, efficient
.flattenormkStringfor nested iteratorsFor some reason, the default way of concatenation e.g.
val middle = first ++ lastChildIter ++ sep ++ remaining
Was throwing weird NullPointerExceptions I couldn't figure out =(
Also, ++ didn't seem to be sufficiently lazy, so it was forcing things earlier than it really needed to. It isn't documented anywhere how lazy it's meant to be, whereas
ConcatIteratorhere is obviously lazy and won't even evaluate each iterator until you ask it to