Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/proc/mod3.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.21.9/mod3.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