$u method

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

Implementation

List<V> $u(List<V>? a, List<V>? r) {
  List<V> result = toList();

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

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

  return result;
}