intersection static method

Iterable intersection(
  1. Iterable iterable1,
  2. Iterable iterable2
)

Returns a Iterable containing the intersection of the given Iterable.

Implementation

static Iterable intersection(
    final Iterable iterable1, final Iterable iterable2) {
  final a = Set.of(iterable1);
  final b = Set.of(iterable2);
  return a.intersection(b);
}