You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
return list_insert_unique_sorted<T>(targetList, element, [](const T &leftSide, const T &rightSide) -> bool { return leftSide >= rightSide; }, compareEqual);
505
505
}
506
506
507
-
// TODO: Should a list of new indices by returned instead of bool?
508
-
// TODO: Create a varargs version starting with nothing and adding unique elements from all lists before returning by value, so that duplicates in the first list are also reduced.
509
-
// TODO: Take a function for equality.
507
+
// TODO: Create a varargs union function, starting with nothing and adding unique elements from all lists before returning by value, so that duplicates in the first list are also reduced.
508
+
510
509
// Pre-conditions:
511
510
// * All elements in targetList must be unique, or else they will remain duplicated.
512
511
// * targetList and sourceList may not refer to the same list.
513
512
// Pushes all elements in sourceList that does not already exist in targetList.
514
-
// Returns true iff any element was pushed to targetList.
// TODO: Create a varargs version starting with nothing and adding unique elements from all lists before returning by value, so that duplicates in the first list are also reduced.
527
-
// TODO: Take functions for both equality and sorting.
528
-
// TODO: Assert that the original list is sorted in debug mode.
529
524
// Pre-conditions:
530
525
// All elements in targetList must be unique, or else they will remain duplicated.
531
526
// targetList must be sorted in ascending order.
532
527
// targetList and sourceList may not refer to the same list.
533
528
// Pushes all elements in sourceList that does not already exist in targetList.
534
529
// Returns true iff any element was pushed to targetList.
0 commit comments