http://d.puremagic.com/issues/show_bug.cgi?id=6407

           Summary: take(map) problem
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Keywords: wrong-code
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: bearophile_h...@eml.cc


--- Comment #0 from bearophile_h...@eml.cc 2011-07-30 06:55:01 PDT ---
D2 code:


import std.stdio, std.algorithm, std.range;
auto foo(int p) {
    return map!((int n){ return p; })(iota(3));
}
void main() {
    writeln(take(foo(2), 20));
}


To me it prints:
[4221068, 4221068, 4221068]

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to