https://d.puremagic.com/issues/show_bug.cgi?id=12404

           Summary: Zip.back is wrong
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: [email protected]
        ReportedBy: [email protected]


--- Comment #0 from [email protected] 2014-03-18 07:31:34 PDT ---
Because it processes the back of each range, rather than an index. EG:

//----
import std.range, std.stdio;

void main()
{
    auto a = [1];
    auto b = [1, 2];
    auto c = [1, 2, 3];
    zip(a, b, c).back.writeln();
}
//----

This writes "Tuple!(int, int, int)(1, 2, 3)".

For "shortest", it should print "1, 1, 1".
For "longest", it should print "0, 0, 3".

For "same length", it's an error.

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

Reply via email to