@mikuroxina/mini-fn
    Preparing search index...

    Function zipWith

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

      Type Parameters

      • T
      • U
      • V

      Parameters

      • zipper: (t: T) => (u: U) => V

      Returns (lList: List.List<T>) => (rList: List.List<U>) => List.List<V>

      The zipped list.

      Examples

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

      const zipped = zipWith((a: number) => (b: number) => a * b)(aList)(bList);
      expect(toArray(zipped)).toStrictEqual([3, 20, 4]);