• Zips two lists as the list of tuple.

    Type Parameters

    • T

    Parameters

    • aList: List<T>

      The left-side list.

    Returns (<U>(bList) => List<[T, U]>)

    The zipped list.

    Examples

    import { empty, fromArray, toArray, zip } from "./list.ts";
    import { assertEquals } from "../deps.ts";

    const aList = fromArray([1, 4, 2]);
    const bList = fromArray([3, 5, 2]);

    assertEquals(toArray(zip(aList)(bList)), [
    [1, 3],
    [4, 5],
    [2, 2],
    ]);
      • <U>(bList): List<[T, U]>
      • Type Parameters

        • U

        Parameters

        Returns List<[T, U]>

Generated using TypeDoc