traverse
import { traverse } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/either.ts";Traverse an Either with an Applicative. If the Either is Left, it's wrapped in the Applicative. If it's Right, the function is applied and the result is wrapped.
@example
import * as E from "./either.ts";
import * as A from "./array.ts";
const traverseArray = E.traverse(A.ApplicableArray);
const double = (n: number) => [n * 2];
const result1 = traverseArray(double)(E.right(21));
// [Right(42)]
const result2 = traverseArray(double)(E.left("error"));
// [Left("error")]