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

Apply a function to the result of an Async computation.

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

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

const value = await result(); // 10
function map<A, I>(fai: (a: A) => I): (ta: Async<A>) => Async<I>;
§
map<A, I>(fai: (a: A) => I): (ta: Async<A>) => Async<I>
[src]

§Type Parameters

§Parameters

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

§Return Type

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