Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

getFlatmappableRight

import { getFlatmappableRight } from "https://github.gh-proxy.cn/raw.githubusercontent.com/baetheus/fun/main/these.ts";

Create a Flatmappable instance for These with a fixed left type.

@example
import { getFlatmappableRight, right, both, left } from "./these.ts";
import * as S from "./string.ts";
import { pipe } from "./fn.ts";

const { flatmap } = getFlatmappableRight(S.CombinableString);
const result1 = pipe(right, flatmap((n: number) => right(n * 2))); // Right(10)
const result2 = pipe(
  both("Warning", 5),
  flatmap((n: number) => right(n * 2))
); // Both("Warning", 10)
function getFlatmappableRight<B>({ combine }: Combinable<B>): Flatmappable<KindRightThese<B>>;
§
getFlatmappableRight<B>({ combine }: Combinable<B>): Flatmappable<KindRightThese<B>>
[src]

§Type Parameters

§Parameters

§
{ combine }: Combinable<B>
[src]