import { fn_either } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { flatmap } = fn_either;
Chain the right 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>(),
FE.flatmap(s => FE.right(s.length)),
)("Hello"); // Right(5)