flatMapToList<T> method

List<T> flatMapToList<T>(
  1. List<T> destination,
  2. EntryTransform<K, V, Iterable<T>> f
)

Appends to the give destination with the elements yielded from results of transform f function being invoked on each element of original entries.

Implementation

List<T> flatMapToList<T>(
    List<T> destination, EntryTransform<K, V, Iterable<T>> f) {
  flatMap(f).forEach((e) => destination.add(e));
  return destination;
}