May 07 [Issue 24541] New: cartesianProduct should have length for finite ranges | ||||
---|---|---|---|---|
| ||||
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: nobody@puremagic.com Reporter: dlang-bugzilla@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)); -- |
Copyright © 1999-2021 by the D Language Foundation