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

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

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

const datumFn = replete((n: number) => n * 2);
const datumValue = replete(5);
const result = pipe(
  datumFn,
  apply(datumValue)
);
console.log(result); // { tag: "Replete", value: 10 }
function apply<A>(ua: Datum<A>): <I>(ufai: Datum<(a: A) => I>) => Datum<I>;
§
apply<A>(ua: Datum<A>): <I>(ufai: Datum<(a: A) => I>) => Datum<I>
[src]

§Type Parameters

§Parameters

§Return Type

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