[Issue 8715] zipWith

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 23 17:48:01 PDT 2012


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



--- Comment #2 from bearophile_hugs at eml.cc 2012-09-23 17:48:57 PDT ---
A simpler alternative idea is to just extend zip() to optionally accept a
function/constructor (it's also good for map() to accept a struct name):

import std.range;
void main() {
    auto r1 = zip!q{a + b}([1,2,3], [10,20,30]);
    static struct Vec { int x, y; }
    auto r2 = zip!Vec([1,2,3], [10,20,30]);
}

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


More information about the Digitalmars-d-bugs mailing list