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

applySequential

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

Apply a function wrapped in an Async to a value wrapped in an Async, sequentially.

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

const asyncFn = wrap((n: number) => n * 2);
const asyncValue = wrap(5);

const result = pipe(
  asyncFn,
  applySequential(asyncValue)
);

const value = await result(); // 10
function applySequential<A>(ua: Async<A>): <I>(ufai: Async<(a: A) => I>) => Async<I>;
§
applySequential<A>(ua: Async<A>): <I>(ufai: Async<(a: A) => I>) => Async<I>
[src]

§Type Parameters

§Parameters

§Return Type

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