x eagerly intersected with y. TODO: move to container/common.d.
r-value and l-value intersection
import std.typecons : Nullable; import nxt.digest.fnv : FNV; import nxt.array_help : s; alias K = Nullable!(uint, uint.max); alias X = HybridHashSet!(K, FNV!(64, true)); auto x = X.withElements([K(12), K(13)].s); auto y = X.withElements([K(10), K(12), K(13), K(15)].s); y.intersectWith(x); assert(y.length == 2); assert(y.contains(K(12))); assert(y.containsUsingLinearSearch(K(12))); assert(y.contains(K(13))); assert(y.containsUsingLinearSearch(K(13)));