Bug 24541 – cartesianProduct should have length for finite ranges

Status
NEW
Severity
enhancement
Priority
P4
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-05-07T09:16:37Z
Last change time
2024-12-01T16:42:30Z
Assigned to
No Owner
Creator
Vladimir Panteleev
Moved to GitHub: phobos#9871 →

Comments

Comment #0 by dlang-bugzilla — 2024-05-07T09:16:37Z
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));
Comment #1 by robert.schadek — 2024-12-01T16:42:30Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/phobos/issues/9871 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB