flatten method

KtList<T> flatten()

Returns a single list of all elements from all collections in the given collection.

Implementation

KtList<T> flatten() {
  final result = KtMutableList<T>.empty();
  for (final element in iter) {
    result.addAll(element);
  }
  return result;
}