baseIntersection function

List baseIntersection(
  1. List lists, {
  2. dynamic comparator,
})

Implementation

List baseIntersection(List lists, {comparator}) {
  return lists[0].where((e) {
    bool intersects = true;
    for (int i = 1; i < lists.length; i++) {
      if (evaluateDifference((lists[i] as List), e, comparator: comparator)) {
        intersects = false;
        break;
      }
    }
    return intersects;
  }).toList();
}