import { fn_either } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { getRightMonad } = fn_either;
Create a Monad for FnEither where left values are combined using the supplied Semigroup.
Examples
Example 1
Example 1
import * as FE from "./fn_either.ts";
import { SemigroupNumberSum } from "./number.ts";
import { pipe } from "./fn.ts";
const { ap } = FE.getRightMonad(SemigroupNumberSum);
const result1 = pipe(
FE.left(1),
ap(FE.left(1)),
); // Left(2)
Parameters
unnamed 0: Semigroup<B>