Rename Stream<T> to Sequence<T> and provide migration path via deprecated types and functions.

This commit is contained in:
Ilya Ryzhenkov
2015-03-10 18:10:57 +03:00
parent 9684d217b3
commit e448f40756
47 changed files with 1906 additions and 556 deletions
@@ -10,7 +10,7 @@ class FunctionIteratorTest {
Test fun iterateOverFunction() {
var count = 3
val iter = stream<Int> {
val iter = sequence<Int> {
count--
if (count >= 0) count else null
}
@@ -20,7 +20,7 @@ class FunctionIteratorTest {
}
Test fun iterateOverFunction2() {
val values = stream<Int>(3) { n -> if (n > 0) n - 1 else null }
val values = sequence<Int>(3) { n -> if (n > 0) n - 1 else null }
assertEquals(arrayListOf(3, 2, 1, 0), values.toList())
}
}