mapToSet<T> method Null safety

Set<T> mapToSet<T>(
  1. Set<T> destination,
  2. EntryTransform<K, V, T> f
)

Transforms entries to objects of type T with the transformer f, and appends the result to the given destination.

Implementation

Set<T> mapToSet<T>(Set<T> destination, EntryTransform<K, V, T> f) {
  mapEntries(f).forEach((e) => destination.add(e));
  return destination;
}