import { state } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { execute } = state;
Extract the ending state value S by executing State<S, A> with an S value.
Examples
Example 1
Example 1
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
Parameters
s: S