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

mapSecond

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

Creates a new Pair with the same first value and a new second value determined by the output of the fbj function.

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

const result = pipe(
  P.pair(1, 2),
  P.mapSecond(String),
); // [1, '2']
function mapSecond<B, J>(fbj: (a: B) => J): <A>(ta: Pair<A, B>) => Pair<A, J>;
§
mapSecond<B, J>(fbj: (a: B) => J): <A>(ta: Pair<A, B>) => Pair<A, J>
[src]

§Type Parameters

§Parameters

§
fbj: (a: B) => J
[src]

§Return Type

§
<A>(ta: Pair<A, B>) => Pair<A, J>
[src]