slice method
Returns a list containing elements at specified indices
.
Implementation
KtList<T> slice(KtIterable<int> indices) {
if (indices.count() == 0) {
return emptyList<T>();
}
final list = mutableListOf<T>();
for (final index in indices.iter) {
list.add(get(index));
}
return list;
}