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

getRightFlatmappable

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

Creates a Flatmappable instance for Pair where the second parameter is concatenated according to the Monoid instance passed in.

@example
import { InitializableNumberSum } from "./number.ts";
import { getRightFlatmappable, pair } from "./pair.ts";
import { pipe } from "./fn.ts";

const Flatmappable = getRightFlatmappable(InitializableNumberSum);

const ageOneYear = (name: string) => pair(name, 1);

const result = pipe(
  pair("Brandon", 36), // Pair(Name, Age)
  Flatmappable.flatmap(ageOneYear),
  Flatmappable.flatmap(ageOneYear)
); // ["Brandon", 38]
function getRightFlatmappable<L>(I: Initializable<L>): Flatmappable<KindRightPair<L>>;
§
getRightFlatmappable<L>(I: Initializable<L>): Flatmappable<KindRightPair<L>>
[src]

§Type Parameters

§Parameters