$u method

Set<V> $u(
  1. Set<V>? a,
  2. Set<V>? r
)

Implementation

Set<V> $u(Set<V>? a, Set<V>? r) {
  Set<V> result = toSet();

  if (a?.isNotEmpty ?? false) {
    result = result.followedBy(a!).toSet();
  }

  if (r?.isNotEmpty ?? false) {
    result = result.where((i) => !r!.contains(i)).toSet();
  }

  return result;
}