import { state } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { gets } = state;
Construct a State<E, A> from a function E => A.
Examples
Example 1
Example 1
import * as S from "./state.ts";
const length = S.gets((s: string) => s.length);
const result = length("Hello World"); // [11, "Hello World"]