[Challenge] implementing the ambiguous operator in D

Peter Alexander peter.alexander.au at gmail.com
Tue Sep 7 00:43:05 PDT 2010


I agree with Andrei here, building hypercubes makes more sense, and feels like it has more structure. It
also has the nice property that, once you've seen a (n+1)th element of any range then you have already
explored the entire product of the first n elements of every range, kind of like how the colex ordering
works.

But which way would you add the successive "shells"?

Like this?: (00) (01 10 11) (02 12 20 21 22)... i.e. lex order?

btw, what are some real-world uses of the cartesian product of infinite ranges? I can't think of any off
the top of my head.


More information about the Digitalmars-d mailing list