merge Sorted
inline fun <T, R : Comparable<R>> Iterable<Iterable<T>>.mergeSorted(crossinline selector: (T) -> Comparable<R>): Iterable<T>(source)
Returns an iterable over the merged contents of all given Iterables in this. Equivalent entries will not be de-duplicated.
Callers must ensure that the source Iterables are in non-descending order as this method does not sort its input.
For any equivalent elements across all this, it is undefined which element is returned first.
See also
inline fun <T, R : Comparable<R>> Iterable<Iterator<T>>.mergeSorted(crossinline selector: (T) -> Comparable<R>): Iterator<T>(source)
Returns an iterator over the merged contents of all given this, traversing every element of the input iterators. Equivalent entries will not be de-duplicated.
Callers must ensure that the source Iterators are in non-descending order as this method does not sort its input.
For any equivalent elements across all of this, it is undefined which element is returned first.