pub fn difference<T, L, R>(a: L, b: R) -> impl Iterator<Item = T>Expand description
Take the difference of two sets (elements in a but not in b) represented by sorted,
deduplicated iterators.
Time complexity: O(a.len() + b.len()).
ยงExamples
use iter_set::difference;
let a = [1, 2];
let b = [2, 3];
assert!(difference(&a, &b).eq(&[1]));