setAccumulator<T> function

Set<T> setAccumulator<T>({
  1. required T value,
  2. Set<T>? previous,
})

An Accumulator that adds all the values to a set.

Implementation

Set<T> setAccumulator<T>({required T value, Set<T>? previous}) =>
    (previous ?? <T>{})..add(value);