intersect package:heaps
O(n log n + m log m). Intersect the values in two heaps,
returning the value in the left heap that compares as equal
O(n log n + m log m). Intersect the values in two heaps using a
function to generate the elements in the right heap.