import { pair } from "https://deno.land/x/iter@v3.2.3/lib/combiners.ts";
Creates a new iterable containing tuples of each element of it1
and it2
.
Examples
Example 1
Example 1
import * as iter from "https://deno.land/x/iter/mod.ts";
const pairs = iter.pair([1, 2, 3], ["a", "b", "c"]);
for (pair of pairs) {
console.log(pair);
}
// -> [1, "a"]
// -> [2, "b"]
// -> [3, "c"]
Returns
IterableCircular<[T, U]>
An iterable containing pairs of items taken from it1
and it2