An Iterator with a close method to close the underlying data source.
Implementers must close the data source when hasNext returns false.
Close the underlying data source.
Close the underlying data source. The behaviour of any methods of this
object after closing it is undefined.
(Changed in version 2.8.0) collect has changed. The previous behavior can be reproduced with toSeq.
Return a new CloseableIterator which also closes the supplied Closeable
object when itself gets closed.
(Since version 2.10.0) use fold instead