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

map

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

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

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

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

§Type Parameters

§Parameters

§
fai: (a: A) => I
[src]

§Return Type

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