import { array } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { traverse } = array;
Traverse a ReadonlyArray using an Applicable over V and a mapping function A => V.
Examples
Example 1
Example 1
import * as A from "./array.ts";
import { pipe, identity } from "./fn.ts";
const traverse = A.traverse(A.ApplicableArray);
const result = pipe(
[[1, 2], [3, 4]],
traverse(identity),
); // [[1, 3], [1, 4], [2, 3], [2, 4]]
Parameters
A: Applicable<V>