http://d.puremagic.com/issues/show_bug.cgi?id=8715
--- Comment #3 from timon.g...@gmx.ch 2012-09-23 18:04:46 PDT --- (In reply to comment #2) > 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]); > } I prefer this. 'zip' would become 'zipWith' with a default template argument of 'tuple'. (map already accepts a struct with an appropriate constructor as that fits the 'callable' definition.) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------