There’s an extension function in the standard library for Sequence
, its implementation is as follows:
/**
* Returns this sequence as a [Sequence].
*/
@kotlin.internal.InlineOnly
public inline fun <T> Sequence<T>.asSequence(): Sequence<T> {
return this
}
At first sight it doesn’t look like this function has any use at all, it returns the exact same object.
What was the reason for adding this function?