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

execute

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

Extract the ending state value S by executing State<S, A> with an S value.

@example
import * as S from "./state.ts";
import { pipe } from "./fn.ts";

const result = pipe(
  S.id<number>(),
  S.map(n => n + 1),
  S.execute(10),
); // 10
function execute<S>(s: S): <A>(ta: State<S, A>) => S;
§
execute<S>(s: S): <A>(ta: State<S, A>) => S
[src]

§Type Parameters

§Parameters

§Return Type

§
<A>(ta: State<S, A>) => S
[src]