Skip to main content
Module

x/fun/mod.ts>fn_either.getRightFlatmappable

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

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)

Parameters

unnamed 0: Combinable<B>