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/identity.ts";

Apply a function to the value in an Identity.

@example
import { map, wrap } from "./identity.ts";
import { pipe } from "./fn.ts";

const identity = wrap(5);
const doubled = pipe(
  identity,
  map(n => n * 2)
);

console.log(doubled); // 10
function map<A, I>(fai: (a: A) => I): (ta: Identity<A>) => Identity<I>;
§
map<A, I>(fai: (a: A) => I): (ta: Identity<A>) => Identity<I>
[src]

§Type Parameters

§Parameters

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

§Return Type

§
(ta: Identity<A>) => Identity<I>
[src]