The zipped list.
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]);
Generated using TypeDoc
Zips two lists by
zipper
. Or this liftszipper
ontoList
.