Asynchronous Iterable over remote data
问题 There is some data that I have pulled from a remote API, for which I use a Future-style interface. The data is structured as a linked-list. A relevant example data container is shown below. case class Data(information: Int) { def hasNext: Boolean = ??? // Implemented def next: Future[Data] = ??? // Implemented } Now I'm interested in adding some functionality to the data class, such as map , foreach , reduce , etc. To do so I want to implement some form of IterableLike such that it inherets