Rename sequence and iterator builder functions and their scope class
This introduces new functions instead of the existing sequence builders: - `sequence` instead of `buildSequence` - `iterator` instead of `buildIterator` - `SequenceScope` instead of `SequenceBuilder` The old functions were deprecated with error and made inline-only, and `SequenceBuilder` has been made a deprecated typealias to `SequenceScope`. Move sequence builders to `SequencesKt` facade class. Replace sequence builder usages in stdlib and samples. #KT-26678
This commit is contained in:
@@ -1658,7 +1658,7 @@ public fun <T> Sequence<T>.zipWithNext(): Sequence<Pair<T, T>> {
|
||||
*/
|
||||
@SinceKotlin("1.2")
|
||||
public fun <T, R> Sequence<T>.zipWithNext(transform: (a: T, b: T) -> R): Sequence<R> {
|
||||
return buildSequence result@ {
|
||||
return sequence result@ {
|
||||
val iterator = iterator()
|
||||
if (!iterator.hasNext()) return@result
|
||||
var current = iterator.next()
|
||||
|
||||
Reference in New Issue
Block a user