apply
import { apply } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/either.ts";Apply a function wrapped in an Either to a value wrapped in an Either. If either is Left, the result is Left. If both are Right, the function is applied to the value.
@example
import * as E from "./either.ts";
const add = (a: number) => (b: number) => a + b;
const addEither = E.right(add);
const valueEither = E.right(5);
const result = E.apply(valueEither)(addEither);
// Right((b: number) => 5 + b)
const result2 = E.apply(E.left("error"))(addEither);
// Left("error")