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

mergeSecond

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

Apply a function in the first position of a pair to a value in the second position of a pair.

@example
import * as P from "./pair.ts";
import { flow } from "./fn.ts";

const double = flow(
  P.dup<number>,
  P.mapSecond(n => (m: number) => n + m),
  P.mergeSecond,
);

const result1 = double(1); // 2
const result2 = double(2); // 4
function mergeSecond<A, I>(ua: Pair<A, (a: A) => I>): I;
§
mergeSecond<A, I>(ua: Pair<A, (a: A) => I>): I
[src]

§Type Parameters

§Parameters

§
ua: Pair<A, (a: A) => I>
[src]

§Return Type