Skip to main content
Module

x/fun/fn_either.ts>getRightFlatmappable

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Latest
function getRightFlatmappable
import { getRightFlatmappable } from "https://deno.land/x/fun@v2.0.0/fn_either.ts";

Create a Flatmappable for FnEither where left values are combined using the supplied Combinable.

Examples

Example 1

import * as FE from "./fn_either.ts";
import { InitializableNumberSum } from "./number.ts";
import { pipe } from "./fn.ts";

const { apply } = FE.getRightFlatmappable(InitializableNumberSum);

const result1 = pipe(
  FE.left(1),
  apply(FE.left(1)),
); // Left(2)