Take the 2-minute tour ×  I'm looking for a clean way to do this
in Python:  Let's say I have two iterators "iter1" and "iter2":
perhaps a prime number generator, and itertools.count(). I know
a priori that both are are infinite and monotonically
increasing. Now I want to take some simple operation of two args
"op" (perhaps operator.add or operator.mul), and calculate every
element of the first iterator with every element of the next,
using said operation, then yield them one at a time, sorted.
Obviously, this is an infinite sequence itself. (As mentioned in
comment by @RyanThompson: this would be called the Cartesian
Product of these sequences... or, more exactly, the 1d-sort of
that product.)  What is the best way to:    • wrap-up "iter1",
"iter2", and "op" in an iterable that itself yields the values
in monotonically increasing output.  Allowable simplifying
assumptions:    • If it helps, we can assume op(a,b) >= a and
op(a,b) >= b.   • If it helps, we can assume op(a,b) > op(a,c)
for all b > c.  Also allo