subset<T> function Set operations

bool subset<T>(
  1. Iterable<Object?> a,
  2. Iterable<Object?> b
)

Returns true if a is a subset of b: if every value in the given iterable a is also in the given iterable b.

subset([1, 3], [0, 2, 1, 3, 0]); // true

Implementation

bool subset<T>(Iterable<Object?> a, Iterable<Object?> b) {
  return superset(b, a);
}