https://issues.dlang.org/show_bug.cgi?id=24541
Issue ID: 24541 Summary: cartesianProduct should have length for finite ranges Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P4 Component: phobos Assignee: nob...@puremagic.com Reporter: dlang-bugzi...@thecybershadow.net Does not compile: import std.algorithm.setops; assert(cartesianProduct([1, 2], [3, 4]).length == 4); Currently the code does: return joiner(map!((ElementType!R1 a) => zip(repeat(a), range2.save)) (range1)); --