zipWith

Zip ranges together with operation fun.

TODO Remove when Issue 8715 is fixed providing zipWith

zipWith
(
alias fun
Ranges...
)
(
Ranges ranges
)
if (
Ranges.length >= 2 &&
allSatisfy!(isInputRange, Ranges)
)

Examples

auto x = [1, 2, 3];
import std.array: array;
assert(zipWith!`a+b`(x, x).array == [2, 4, 6]);
assert(zipWith!((a, b) => a + b)(x, x).array == [2, 4, 6]);
assert(zipWith!`a+b+c`(x, x, x).array == [3, 6, 9]);

Meta