Andrei Alexandrescu <seewebsiteforem...@erdani.org> wrote:

Yah, there's no argument that infinite ranges must be allowed by a n-way cross-product. It reminds one of Cantor's diagonalization, just in several dimensions. Shouldn't be very difficult, but it only works if all ranges except one are forward ranges (one can be an input range).

Might I coerce you into indulging some more detail on this idea? I'm
afraid my knowledge of the diagonal method is sadly lacking, and some
reading on the subject did not give me satisfactory understanding of
its application in the discussed problem.

Way I thought of doing it is save the highest position this far of each
range, then in popFront see if we're past it. If we are, reset this
range, and pop from the next range up, recursively.

--
Simen

Reply via email to