• Zips two lists by zipper. Or this lifts zipper onto List.

    Type Parameters

    • T

    • U

    • V

    Parameters

    • zipper: ((t) => ((u) => V))
        • (t): ((u) => V)
        • Parameters

          • t: T

          Returns ((u) => V)

            • (u): V
            • Parameters

              • u: U

              Returns V

    Returns ((lList) => ((rList) => List<V>))

    The zipped list.

    Examples

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

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

    const zipped = zipWith((a: number) => (b: number) => a * b)(aList)(bList);
    assertEquals(toArray(zipped), [3, 20, 4]);
      • (lList): ((rList) => List<V>)
      • Parameters

        Returns ((rList) => List<V>)

Generated using TypeDoc