Drop deprecated sequence() and withIndices()

This commit is contained in:
Ilya Gorbunov
2015-09-29 22:28:33 +03:00
parent 1c79cf2b51
commit e54db8cd2a
7 changed files with 0 additions and 252 deletions
@@ -1116,15 +1116,6 @@ public fun <T> Iterable<T>.withIndex(): Iterable<IndexedValue<T>> {
return IndexingIterable { iterator() }
}
/**
* Returns a list containing pairs of each element of the original collection and their index.
*/
@Deprecated("Use withIndex() instead.")
public fun <T> Iterable<T>.withIndices(): List<Pair<Int, T>> {
var index = 0
return mapTo(ArrayList<Pair<Int, T>>(), { index++ to it })
}
/**
* Returns a list containing only distinct elements from the given collection.
* The elements in the resulting list are in the same order as they were in the source collection.
@@ -1650,14 +1641,6 @@ public fun <T> Iterable<T>.asSequence(): Sequence<T> {
}
}
/**
* Returns a sequence from the given collection
*/
@Deprecated("Use asSequence() instead", ReplaceWith("asSequence()"))
public fun <T> Iterable<T>.sequence(): Sequence<T> {
return asSequence()
}
/**
* Returns a list containing all elements that are instances of specified type parameter R.
*/