FVariantOperation<K extends FVariantConstraint, E extends FVariant, V, D extends Delta>.removeMatch constructor

FVariantOperation<K extends FVariantConstraint, E extends FVariant, V, D extends Delta>.removeMatch(
  1. Set<E> variants
)

Removes existing variants whose constraint's variants are all present in variants.

// Given {a: 1, b: 2, c: 3, a & b: 4, a & c: 5}
.removeMatch({a, b}) // {c: 3, a & c: 5}

See also:

Implementation

FVariantOperation.removeMatch(Set<E> variants)
  : _call = ((base, existing) => .raw(base, {
      for (final MapEntry(key: constraint, :value) in existing.entries)
        if (!constraint.satisfiedBy(variants)) constraint: value,
    }));