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

Apply a function to the value in a Datum.

@example
import { map, replete, initial } from "./datum.ts";
import { pipe } from "./fn.ts";

const datum = pipe(
  replete(5),
  map(n => n * 2)
);
console.log(datum); // { tag: "Replete", value: 10 }
function map<A, I>(fai: (a: A) => I): (ta: Datum<A>) => Datum<I>;
§
map<A, I>(fai: (a: A) => I): (ta: Datum<A>) => Datum<I>
[src]

§Type Parameters

§Parameters

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

§Return Type

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