import { fn_either } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { fromEither } = fn_either;
Turn an Either into a FnEither.
Examples
Example 1
Example 1
import * as FE from "./fn_either.ts";
import * as E from "./either.ts";
const left = E.left(1);
const right = E.right(1);
const fnLeft = FE.fromEither(left);
const fnRight = FE.fromEither(right);
const result1 = fnLeft(null); // Left(1);
const result2 = fnRight(null); // Right(1);