Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/proc/mod.ts>Enumerable#zip

A better way to work with processes in Deno.
Latest
method Enumerable.prototype.zip
Re-export
import { Enumerable } from "https://deno.land/x/proc@0.22.1/mod.ts";

Zip two Enumerables together. If collections are unequal length, the longer collection is truncated.

Example

const a = range({ from: 1, until: 3 });
const b = enumerate(["A", "B", "C"]);

const result = a.zip(b);

// [[1, "A"], [2, "B"], [3, "C"]]

Parameters

other: AsyncIterable<U>

The other iterable.

Returns

The result of zipping