Andrei Alexandrescu:
I'm disappointed cartesianProduct works that way; I should have caught that during the code review. A better iteration order would have spanned the lower position in both ranges first, i.e. create squares of increasing side in the 2D space.
I opened this: http://d.puremagic.com/issues/show_bug.cgi?id=9878 Bye, bearophile