- Kotlin Standard Library Cookbook
- Samuel Urbanowicz
- 57字
- 2021-07-23 19:05:51
There's more...
There is a convenient way of transforming Collection to Sequence. We can do so with the asSequence() extension function provided by the Kotlin standard library for the Iterable type. In order to convert a Sequence instance into a Collection instance, you can use the toList() function.