http://d.puremagic.com/issues/show_bug.cgi?id=8803
Summary: map.filter.array run map delegate an incorrect number of time. Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: deadal...@gmail.com --- Comment #0 from deadalnix <deadal...@gmail.com> 2012-10-11 14:12:44 PDT --- See sample code : import std.algorithm; import std.range; void main() { uint i; uint[] iarray; iarray.length = 10; iarray.map!(a => i++).filter!(a => a > 0).array(); import std.stdio; writeln(i); } This program output 19. In other terms, map delegate is run twice on every element on which filter's delegate returns true. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------