alt
import { alt } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/either.ts";Provide an alternative Either value if the first one is Left. If the first is Right, it's returned unchanged.
@example
import * as E from "./either.ts";
const result1 = E.alt(E.right("fallback"))(E.left("error"));
// Right("fallback")
const result2 = E.alt(E.right("fallback"))(E.right("original"));
// Right("original")