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

apply

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

Apply a function wrapped in a Sync to a value wrapped in a Sync.

@example
import { apply, wrap } from "./sync.ts";
import { pipe } from "./fn.ts";

const syncFn = wrap((n: number) => n * 2);
const syncValue = wrap(5);
const result = pipe(
  syncFn,
  apply(syncValue)
);

const value = result(); // 10
function apply<A>(ua: Sync<A>): <I>(ta: Sync<(a: A) => I>) => Sync<I>;
§
apply<A>(ua: Sync<A>): <I>(ta: Sync<(a: A) => I>) => Sync<I>
[src]

§Type Parameters

§Parameters

§Return Type

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