IterableListOpsExtensions<T> extension

List/set operations: difference, intersection, union, interleave.

on

Methods

difference(Iterable<T> other) List<T>

Available on Iterable<T>, provided by the IterableListOpsExtensions extension

Elements in this iterable that are not in other. Uses Object.== and hashCode.
interleave(Iterable<T> other) List<T>

Available on Iterable<T>, provided by the IterableListOpsExtensions extension

Interleaves this with other: a0, b0, a1, b1, .... Stops when the shorter runs out.
intersection(Iterable<T> other) List<T>

Available on Iterable<T>, provided by the IterableListOpsExtensions extension

Elements that appear in both this and other.
union(Iterable<T> other) List<T>

Available on Iterable<T>, provided by the IterableListOpsExtensions extension

Distinct union of this and other (all elements, no duplicates).