Given that f(lhs(i), rhs(j)) >= f(lhs(i + 1), rhs(j))
and
f(lhs(i), rhs(j)) >= f(lhs(i), rhs(j + 1))
for all i, j, then this will
cross lhs
with rhs
, gauranteeing that the returned stream is in order.
Merges 2 streams, sorted by f
, in sorted order.
Merges 2 streams, sorted by f
, in sorted order. The resulting stream
contains all the same elements as both lhs
and rhs
.