import { recover } from "https://deno.land/x/fun@v2.0.0/fn_either.ts";
Chain the left result of one FnEither into another FnEither.
Examples
Example 1
Example 1
import * as FE from "./fn_either.ts";
import { pipe } from "./fn.ts";
const result = pipe(
FE.id<string, number>(),
FE.flatmap(s => FE.left(s.length)),
FE.recover(n => FE.right(String(n))),
)("Hello"); // Right("5")