TraversableOnce: "A template feature for collections that can only be passed once or one or more times ."
I do not understand this sentence. Why go through more times ? Not just once ? Thanks!
Scaladoc also says
Iterator Traversable , , , foreach Builder.
foreach
"" . .
, TraversableOnce - , , . Iterator, Traversable !
, Collections, , ( ) Scala 2.8 Collection Design Tutorial .
- , :
Iterator.continually(readline)
, , , .
, , Array, Map ..
Array
Map
Traversable , . , Traversable TraversableOnce, TraversableOnce , .
, Scala 2.13 ( 2019 ) Traversable TraversableOnce: Iterable IterableOnce. ( )
Traversable
TraversableOnce
Iterable
IterableOnce
IterableOnce :
A collection template feature that can only be viewed once or once or several times.
This time:
The goal is to provide a minimal interface without any sequential operations.This allows third-party extensions, such as parallel Scala collections, to integrate at the level IterableOncewithout inheriting undesirable implementations.
Source: https://habr.com/ru/post/1622318/More articles:Android RecyclerView Scroll не работает после редактирования макета - androidHow to create a virtual environment for a specific version of Python? - pythonAdding an index to RDD using common mutable state - scalaHow to use sort_link with model instance method in rails 4 with Ransack Gem? - ruby | fooobar.comxmlStreamReader Evaluation Error: wrapped java.lang.IllegalStateException - demandwareExceptions in the Hbase realm server - hbaseIs the document / view architecture in MFC basically a Model / View / Controller template, but without a controller? - c ++RegexIterator filters images, ignores specific directory - phpUnable to access 127.0.0.1 - windowsFind maximum with limited length in list - pythonAll Articles