Add 'asSequence' operation support

This commit is contained in:
Vitaliy.Bibaev
2017-12-22 15:15:11 +03:00
committed by Yan Zhulanow
parent 64dec10bd5
commit bde34b45e7
5 changed files with 43 additions and 3 deletions
@@ -0,0 +1,32 @@
LineBreakpoint created at AsSequence.kt:5
Run Java
Connected to the target VM
AsSequence.kt:5
sequenceOf(1, 2, 3)
.asSequence()
.count()
asSequence
before: 1,3,5
after: 2,4,6
count
before: 2,4,6
after: nothing
mappings for asSequence
direct:
1 -> 2
3 -> 4
5 -> 6
reverse:
1 <- 2
3 <- 4
5 <- 6
mappings for count
direct:
2 -> nothing
4 -> nothing
6 -> nothing
reverse:
empty
Disconnected from the target VM
Process finished with exit code 0
@@ -0,0 +1,6 @@
package misc
fun main(args: Array<String>) {
// Breakpoint!
sequenceOf(1, 2, 3).asSequence().count()
}