I see cartesianProduct in std.algorithm. I read: auto N = sequence!"n"(0); // the range of natural numbersauto N2 = cartesianProduct(N, N); // the range of all pairs of natural numbers
So it gives (0,0) (0,1) (1,0) ... and so on. Is there a way to generate only tuple: a[0] > a[1] (0,1) (0,2) ... (1,2) (1,3) .. (2,3) (2,4) ora[0] >= a[1] (0,0) (0,1) (0,2) ... (1,1) (1,2) (1,3) .. (2,2) (2,3) (2,4)
Or the only way is use filter!(...) after cartesianProduct?