union function

dynamic union(
  1. List<List> arrays
)

Creates an list of unique values, in order

Example

_.union([
 [2],
 [1, 2]
]);
// Returns [2, 1]

Implementation

/// // Returns [2, 1]
///```
union(List<List> arrays) {
  return arrays.fold<Set>(arrays.first.toSet(), (a, b) => a.union(b.toSet()));
}