recover
import { recover } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/either.ts";Recover from a Left value by applying a function that returns an Either. Right values are unchanged.
@example
import * as E from "./either.ts";
const fallback = (error: string) => E.right(`Fallback: ${error}`);
const result1 = E.recover(fallback)(E.left("Something failed"));
// Right("Fallback: Something failed")
const result2 = E.recover(fallback)(E.right(42));
// Right(42)