containsAtLeast<E> function

bool containsAtLeast<E>(
  1. Iterable<E> listA,
  2. Iterable<E> listB,
  3. int atLeast
)

Check if atLeast elements in the listB is contains in the listA

Implementation

bool containsAtLeast<E>(Iterable<E> listA, Iterable<E> listB, int atLeast) {
  int matches = containsHits(listA, listB);
  return matches >= atLeast;
}