selectMany<T1> method

List<T1> selectMany<T1>(
  1. T1 test(
    1. T element
    )
)

selects items from nested lists to single list

Implementation

List<T1> selectMany<T1>(T1 Function(T element) test) {
  List<T1> result = [];
  for (final t in this) {
    final i = t.map(test);
    for (final ii in i) {
      result.add(ii);
    }
  }
  return result;
}