• Unzips the list of tuple into the tuple of list.

    Type Parameters

    • A

    • B

    Parameters

    • list: List<[A, B]>

      The list of tuple.

    Returns [List<A>, List<B>]

    The unzipped tuple.

    Examples

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

    const [aList, bList] = unzip(
    fromArray([
    [2, 3],
    [5, 4],
    [11, 3],
    ]),
    );
    assertEquals(toArray(aList), [2, 5, 11]);
    assertEquals(toArray(bList), [3, 4, 3]);

Generated using TypeDoc